Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Classless test #137

Open
NN--- opened this issue Mar 14, 2018 · 0 comments
Open

Classless test #137

NN--- opened this issue Mar 14, 2018 · 0 comments

Comments

@NN---
Copy link

NN--- commented Mar 14, 2018

What do you think about using implicit class in generation?

Instead of:

 #include <cxxtest/TestSuite.h>

  class MyTestSuite : public CxxTest::TestSuite
  {
  public:
      void testAddition( void )
      {
          TS_ASSERT( 1 + 1 > 1 );
          TS_ASSERT_EQUALS( 1 + 1, 2 );
      }
  };

One could write simple functions and everything with some prefix , e.g. 'test_' , will run automatically and wrapped inside class.
So the code below is equivalent to the above.

 #include <cxxtest/TestSuite.h>

void test_Addition( void )
{
    TS_ASSERT( 1 + 1 > 1 );
    TS_ASSERT_EQUALS( 1 + 1, 2 );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant