From f58d8c096598fb8f70402b3b4ad215a62077c898 Mon Sep 17 00:00:00 2001 From: David Neto Date: Fri, 4 Sep 2015 14:55:28 -0400 Subject: [PATCH] Add disabled test to check float value parsing Disabled for now because float parsing is broken. --- test/TextToBinary.cpp | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/test/TextToBinary.cpp b/test/TextToBinary.cpp index ff5b1de2a..715243085 100644 --- a/test/TextToBinary.cpp +++ b/test/TextToBinary.cpp @@ -412,4 +412,23 @@ TEST_F(TextToBinaryTest, BadSwitchTruncatedCase) { EXPECT_STREQ("Expected operand, found next instruction instead.", diagnostic->error); } +using TextToBinaryFloatValueTest = + test_fixture::TextToBinaryTestBase<::testing::TestWithParam>; + +// TODO(dneto): Fix float parsing. +TEST_P(TextToBinaryFloatValueTest, DISABLED_NormalValues) { + std::stringstream input; + input << + R"(OpTypeFloat %float 32 + %constval = OpConstant %float )" + << GetParam(); + const SpirvVector code = CompileSuccessfully(input.str()); + + EXPECT_EQ(code[6], GetParam()); +} + +INSTANTIATE_TEST_CASE_P(float, TextToBinaryFloatValueTest, + ::testing::ValuesIn(std::vector{1.5, 0.0, + -2.5})); + } // anonymous namespace