a quick question about a header file

I came across a header file which is named "TestSuperMatrix.h" . This header reads


1
2
3
4
5
6
7
8
9
10
11
12
13
#ifndef CPP_UNIT_TESTSUPERMATRIX_H
#define CPP_UNIT_TESTSUPERMATRIX_H

#include <cppunit/extensions/HelperMacros.h>
#include "matrixdef.h"

class cSuperMatrix;
class TestSuperMatrix : public CPPUNIT_NS::TestFixture
{
...
}

#endif 


My question is: What is "TestFixture" or what could it be? I know here the author is defining a derived class "TestSuperMatrix" inherited from another class CPPUNIT_NS. But what the hell is TestFixture? I am confused with such a structure a:b::c{}

Can any one help me out? Thanks very much.

Last edited on
I guess CPPUNIT_NS is not a class according to its suffix "_NS", it's most likely a namespace, and therefor TestFixture is a class declared in CPPUNIT_NS namespace, then I think you should understand it now.
EricDu,

Bravo. Good point! Thanks:)

But can you let me know in which circumstance this declaration of namespace is necessary when defining a derived class? It seems that it doesn't happen often. Please comment. Thanks!
Last edited on
Bump up~
If you don't write the line below before define a derived class, then you have to explicitly specify the parent's full class name including namespace name.

using namespace CPPUNIT_NS;
I see. Thank you!
Topic archived. No new replies allowed.