Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Design And Implementation

Authors: Edward Sciore

2nd Edition

3030338355, 978-3030338350

More Books

Students also viewed these Databases questions

Question

Name and describe Diana Baumrinds three parenting styles.

Answered: 1 week ago

Question

Guidelines for Informative Speeches?

Answered: 1 week ago