Question: In C++ how would I write the three .hpp classes in the below test case? 1 // Let Catch provide main(): 2 #define CATCH_CONFIG_MAIN 3

In C++ how would I write the three .hpp classes in the below test case?

1 // Let Catch provide main(): 2 #define CATCH_CONFIG_MAIN 3 4 #include 5 #include "catch/catch.hpp" 6 #include "../foo.hpp" 7 #include "../bar.hpp" 8 #include "../baz.hpp" 9 10 TEST_CASE("Test Classes. PASS.") 11 { 12 REQUIRE (Foo::GetMagicNumber() == 12); 13 14 Bar b = Bar("Hello"); 15 REQUIRE (b.GetString() == "Hello"); 16 17 Baz *baz = new Baz(90.0 / 9); 18 REQUIRE (baz->GetValue() > 9.999 && baz->GetValue() < 10.0001); 19 } 20 21 // Compile & run: 22 // make clean test

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!