From 14a8c553014a582aaf88ae0a1b81c0e3bcf40953 Mon Sep 17 00:00:00 2001 From: Henry Fredrick Schreiner Date: Thu, 30 Nov 2017 16:35:02 -0500 Subject: [PATCH] Fixing test error with clang + stdlibc++ --- tests/NewParseTest.cpp | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/tests/NewParseTest.cpp b/tests/NewParseTest.cpp index 851b8779..02d3d3f3 100644 --- a/tests/NewParseTest.cpp +++ b/tests/NewParseTest.cpp @@ -36,7 +36,8 @@ TEST_F(TApp, AddingComplexParser) { run(); - EXPECT_EQ(cx(1.5, 2.5), comp); + EXPECT_EQ(1.5, comp.real()); + EXPECT_EQ(2.5, comp.imag()); } TEST_F(TApp, DefaultComplex) { @@ -49,11 +50,13 @@ TEST_F(TApp, DefaultComplex) { EXPECT_THAT(help, HasSubstr("1")); EXPECT_THAT(help, HasSubstr("2")); - EXPECT_EQ(cx(1, 2), comp); + EXPECT_EQ(1, comp.real()); + EXPECT_EQ(2, comp.imag()); run(); - EXPECT_EQ(cx(4, 3), comp); + EXPECT_EQ(4, comp.real()); + EXPECT_EQ(3, comp.imag()); } TEST_F(TApp, BuiltinComplex) { @@ -67,11 +70,13 @@ TEST_F(TApp, BuiltinComplex) { EXPECT_THAT(help, HasSubstr("2")); EXPECT_THAT(help, HasSubstr("COMPLEX")); - EXPECT_EQ(cx(1, 2), comp); + EXPECT_EQ(1, comp.real()); + EXPECT_EQ(2, comp.imag()); run(); - EXPECT_EQ(cx(4, 3), comp); + EXPECT_EQ(4, comp.real()); + EXPECT_EQ(3, comp.imag()); } TEST_F(TApp, BuiltinComplexIgnoreI) { @@ -82,7 +87,8 @@ TEST_F(TApp, BuiltinComplexIgnoreI) { run(); - EXPECT_EQ(cx(4, 3), comp); + EXPECT_EQ(4, comp.real()); + EXPECT_EQ(3, comp.imag()); } TEST_F(TApp, BuiltinComplexFail) {