Commit 4023a354 authored by Kenton Varda's avatar Kenton Varda

Actually, let's use single digits for these otherwise they'll actually be…

Actually, let's use single digits for these otherwise they'll actually be printed in scientific notation with a '.', defeating the purpose of the test.
parent a43a3df6
......@@ -1709,9 +1709,9 @@ TEST(Encoding, WholeFloatDefault) {
auto root = message.initRoot<test::TestWholeFloatDefault>();
EXPECT_EQ(123.0f, root.getField());
EXPECT_EQ(123e30f, root.getBigField());
EXPECT_EQ(2e30f, root.getBigField());
EXPECT_EQ(456.0f, test::TestWholeFloatDefault::CONSTANT);
EXPECT_EQ(456e30f, test::TestWholeFloatDefault::BIG_CONSTANT);
EXPECT_EQ(4e30f, test::TestWholeFloatDefault::BIG_CONSTANT);
}
} // namespace
......
......@@ -498,9 +498,9 @@ struct TestWholeFloatDefault {
# At one point, these failed to compile in C++ because it would produce literals like "123f",
# which is not valid; it needs to be "123.0f".
field @0 :Float32 = 123;
bigField @1 :Float32 = 123e30;
bigField @1 :Float32 = 2e30;
const constant :Float32 = 456;
const bigConstant :Float32 = 456e30;
const bigConstant :Float32 = 4e30;
}
struct TestEmptyStruct {}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment