Skip to content

andreystrokov/unit_test_framework

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 

Repository files navigation

unit_test_framework

  1. Include test_runner.h in your code;
  2. Write tests, using macro ASSERT_EQUAL like:
void TestSum() {
   int i = 4;
   ASSERT_EQUAL (i,sum(2,3));
}
  1. When u wrote tests, write function TestAll, create object TestRunner and add your test function (using RUN_TEST macro)
void TestAll {
    TestRunner tr;
    RUN_TEST(tr,<TestFunc1>);
    RUN_TEST(tr,<TestFunc2>);
  ..
}
  1. input TestAll func in main file code;

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages