20 #include "ns3/object.h" 21 #include "ns3/boolean.h" 22 #include "ns3/integer.h" 23 #include "ns3/uinteger.h" 24 #include "ns3/config.h" 26 #include "ns3/string.h" 27 #include "ns3/random-variable-stream.h" 28 #include "ns3/double.h" 29 #include "ns3/object-vector.h" 30 #include "ns3/object-map.h" 31 #include "ns3/traced-value.h" 32 #include "ns3/callback.h" 33 #include "ns3/trace-source-accessor.h" 34 #include "ns3/pointer.h" 35 #include "ns3/object-factory.h" 36 #include "ns3/nstime.h" 111 .SetParent<Object> ()
112 .HideFromDocumentation ()
113 .AddAttribute (
"TestBoolName",
"help text",
117 .AddAttribute (
"TestBoolA",
"help text",
122 .AddAttribute (
"TestInt16",
"help text",
125 MakeIntegerChecker<int16_t> ())
126 .AddAttribute (
"TestInt16WithBounds",
"help text",
129 MakeIntegerChecker<int16_t> (-5, 10))
130 .AddAttribute (
"TestInt16SetGet",
"help text",
134 MakeIntegerChecker<int16_t> ())
135 .AddAttribute (
"TestUint8",
"help text",
138 MakeUintegerChecker<uint8_t> ())
139 .AddAttribute (
"TestEnum",
"help text",
145 .AddAttribute (
"TestEnumSetGet",
"help text",
152 .AddAttribute (
"TestRandom",
"help text",
153 StringValue (
"ns3::ConstantRandomVariable[Constant=1.0]"),
155 MakePointerChecker <RandomVariableStream>())
156 .AddAttribute (
"TestFloat",
"help text",
159 MakeDoubleChecker<float> ())
160 .AddAttribute (
"TestVector1",
"help text",
163 MakeObjectVectorChecker<Derived> ())
164 .AddAttribute (
"TestVector2",
"help text",
168 MakeObjectVectorChecker<Derived> ())
169 .AddAttribute (
"TestMap1",
"help text",
172 MakeObjectMapChecker<Derived> ())
173 .AddAttribute (
"IntegerTraceSource1",
"help text",
176 MakeIntegerChecker<int8_t> ())
177 .AddAttribute (
"IntegerTraceSource2",
"help text",
181 MakeIntegerChecker<int8_t> ())
182 .AddAttribute (
"UIntegerTraceSource",
"help text",
185 MakeIntegerChecker<uint8_t> ())
186 .AddAttribute (
"DoubleTraceSource",
"help text",
189 MakeDoubleChecker<double> ())
190 .AddAttribute (
"BoolTraceSource",
"help text",
194 .AddAttribute (
"EnumTraceSource",
"help text",
198 .AddAttribute (
"ValueClassSource",
"help text",
202 .AddTraceSource (
"Source1",
"help test",
204 "ns3::TracedValueCallback::Int8")
205 .AddTraceSource (
"Source2",
"help text",
207 "ns3::AttributeObjectTest::NumericTracedCallback")
208 .AddTraceSource (
"ValueSource",
"help text",
210 "ns3::ValueClassTest::TracedValueCallback")
211 .AddAttribute (
"Pointer",
"help text",
214 MakePointerChecker<Derived> ())
215 .AddAttribute (
"PointerInitialized",
"help text",
218 MakePointerChecker<Derived> ())
219 .AddAttribute (
"PointerInitialized2",
"help text",
222 MakePointerChecker<Derived> ())
223 .AddAttribute (
"Callback",
"help text",
227 .AddAttribute (
"TestTimeWithBounds",
"help text",
252 m_vector1.push_back (CreateObject<Derived> ());
256 m_vector2.push_back (CreateObject<Derived> ());
261 m_map1.insert (std::pair <uint32_t,
Ptr<Derived> > (i, CreateObject<Derived> ()));
271 if (!m_cbValue.IsNull ())
288 return m_int16SetGet;
296 return m_vector2.size ();
333 std::map <uint32_t, Ptr<Derived> >
m_map1;
338 typedef void (* NumericTracedCallback) (double, int, float);
357 template <
typename T>
365 virtual void DoRun (
void);
367 bool CheckGetCodePaths (
Ptr<Object> p, std::string attributeName, std::string expectedString, T expectedValue);
370 template <
typename T>
375 template <
typename T>
379 template <
typename T>
bool 382 std::string attributeName,
383 std::string expectedString,
393 bool ok2 = stringValue.
Get () == expectedString;
399 bool ok4 = expectedValue.Get () == actualValue.Get ();
401 return ok1 && ok2 && ok3 && ok4;
413 p = CreateObject<AttributeObjectTest> ();
421 p = CreateObject<AttributeObjectTest> ();
424 ok = CheckGetCodePaths (p,
"TestBoolName",
"true",
BooleanValue (
true));
433 p = CreateObject<AttributeObjectTest> ();
436 ok = CheckGetCodePaths (p,
"TestBoolName",
"false",
BooleanValue (
false));
445 ok = CheckGetCodePaths (p,
"TestBoolName",
"true",
BooleanValue (
true));
446 NS_TEST_ASSERT_MSG_EQ (ok,
true,
"Attribute not set properly by SetAttributeFailSafe() via StringValue");
454 ok = CheckGetCodePaths (p,
"TestBoolName",
"false",
BooleanValue (
false));
455 NS_TEST_ASSERT_MSG_EQ (ok,
true,
"Attribute not set properly by SetAttributeFailSafe() via StringValue");
460 p = CreateObject<AttributeObjectTest> ();
472 ok = CheckGetCodePaths (p,
"TestBoolA",
"true",
BooleanValue (
true));
473 NS_TEST_ASSERT_MSG_EQ (ok,
true,
"Attribute not set properly by SetAttributeFailSafe() (getter/setter) via StringValue");
481 ok = CheckGetCodePaths (p,
"TestBoolA",
"false",
BooleanValue (
false));
482 NS_TEST_ASSERT_MSG_EQ (ok,
true,
"Attribute not set properly by SetAttributeFailSafe() (getter/setter) via StringValue");
491 p = CreateObject<AttributeObjectTest> ();
498 ok = CheckGetCodePaths (p,
"TestInt16",
"-2",
IntegerValue (-2));
507 ok = CheckGetCodePaths (p,
"TestInt16",
"-5",
IntegerValue (-5));
508 NS_TEST_ASSERT_MSG_EQ (ok,
true,
"Attribute not set properly by SetAttributeFailSafe() via StringValue");
516 ok = CheckGetCodePaths (p,
"TestInt16",
"2",
IntegerValue (2));
517 NS_TEST_ASSERT_MSG_EQ (ok,
true,
"Attribute not set properly by SetAttributeFailSafe() via StringValue");
525 ok = CheckGetCodePaths (p,
"TestInt16",
"-32768",
IntegerValue (-32768));
526 NS_TEST_ASSERT_MSG_EQ (ok,
true,
"Attribute not set properly by SetAttributeFailSafe() (most negative) via StringValue");
533 NS_TEST_ASSERT_MSG_EQ (ok,
false,
"Unexpectedly could SetAttributeFailSafe() via StringValue to -32769");
535 ok = CheckGetCodePaths (p,
"TestInt16",
"-32768",
IntegerValue (-32768));
544 ok = CheckGetCodePaths (p,
"TestInt16",
"32767",
IntegerValue (32767));
545 NS_TEST_ASSERT_MSG_EQ (ok,
true,
"Attribute not set properly by SetAttributeFailSafe() (most positive) via StringValue");
552 NS_TEST_ASSERT_MSG_EQ (ok,
false,
"Unexpectedly could SetAttributeFailSafe() via StringValue to 32768");
554 ok = CheckGetCodePaths (p,
"TestInt16",
"32767",
IntegerValue (32767));
564 ok = CheckGetCodePaths (p,
"TestInt16WithBounds",
"10",
IntegerValue (10));
565 NS_TEST_ASSERT_MSG_EQ (ok,
true,
"Attribute not set properly by SetAttributeFailSafe() (positive limit) via StringValue");
571 NS_TEST_ASSERT_MSG_EQ (ok,
false,
"Unexpectedly could SetAttributeFailSafe() via IntegerValue to 11");
573 ok = CheckGetCodePaths (p,
"TestInt16WithBounds",
"10",
IntegerValue (10));
582 ok = CheckGetCodePaths (p,
"TestInt16WithBounds",
"-5",
IntegerValue (-5));
583 NS_TEST_ASSERT_MSG_EQ (ok,
true,
"Attribute not set properly by SetAttributeFailSafe() (negative limit) via StringValue");
589 NS_TEST_ASSERT_MSG_EQ (ok,
false,
"Unexpectedly could SetAttributeFailSafe() via IntegerValue to -6");
591 ok = CheckGetCodePaths (p,
"TestInt16WithBounds",
"-5",
IntegerValue (-5));
601 p = CreateObject<AttributeObjectTest> ();
608 ok = CheckGetCodePaths (p,
"TestUint8",
"1",
UintegerValue (1));
617 ok = CheckGetCodePaths (p,
"TestUint8",
"0",
UintegerValue (0));
618 NS_TEST_ASSERT_MSG_EQ (ok,
true,
"Attribute not set properly by SetAttributeFailSafe() via StringValue");
626 ok = CheckGetCodePaths (p,
"TestUint8",
"255",
UintegerValue (255));
627 NS_TEST_ASSERT_MSG_EQ (ok,
true,
"Attribute not set properly by SetAttributeFailSafe() (positive limit) via UintegerValue");
636 ok = CheckGetCodePaths (p,
"TestUint8",
"255",
UintegerValue (255));
646 ok = CheckGetCodePaths (p,
"TestUint8",
"255",
UintegerValue (255));
647 NS_TEST_ASSERT_MSG_EQ (ok,
true,
"Attribute not set properly by SetAttributeFailSafe() via StringValue");
654 NS_TEST_ASSERT_MSG_EQ (ok,
false,
"Unexpectedly could SetAttributeFailSafe() via StringValue to 256");
656 ok = CheckGetCodePaths (p,
"TestUint8",
"255",
UintegerValue (255));
663 NS_TEST_ASSERT_MSG_EQ (ok,
false,
"Unexpectedly could SetAttributeFailSafe() via StringValue to -1");
672 p = CreateObject<AttributeObjectTest> ();
679 ok = CheckGetCodePaths (p,
"TestFloat",
"-1.1",
DoubleValue ((
float)-1.1));
688 ok = CheckGetCodePaths (p,
"TestFloat",
"2.3",
DoubleValue ((
float)2.3));
689 NS_TEST_ASSERT_MSG_EQ (ok,
true,
"Attribute not set properly by SetAttributeFailSafe() via DoubleValue");
698 p = CreateObject<AttributeObjectTest> ();
715 NS_TEST_ASSERT_MSG_EQ (ok,
true,
"Attribute not set properly by SetAttributeFailSafe() via EnumValue");
731 NS_TEST_ASSERT_MSG_EQ (ok,
true,
"Attribute not set properly by SetAttributeFailSafe() via EnumValue");
740 NS_TEST_ASSERT_MSG_EQ (ok,
true,
"Attribute not set properly by SetAttributeFailSafe() via StringValue");
769 p = CreateObject<AttributeObjectTest> ();
773 Time::SetResolution (Time::NS);
781 ok = CheckGetCodePaths (p,
"TestTimeWithBounds",
"+5e+09ns",
TimeValue (
Seconds (5)));
782 NS_TEST_ASSERT_MSG_EQ (ok,
true,
"Attribute not set properly by SetAttributeFailSafe(5s) via TimeValue");
787 ok = CheckGetCodePaths (p,
"TestTimeWithBounds",
"+3e+09ns",
TimeValue (
Seconds (3)));
788 NS_TEST_ASSERT_MSG_EQ (ok,
true,
"Attribute not set properly by SetAttributeFailSafe(3s) via StringValue");
802 ok = CheckGetCodePaths (p,
"TestTimeWithBounds",
"+1e+10ns",
TimeValue (
Seconds (10)));
803 NS_TEST_ASSERT_MSG_EQ (ok,
true,
"Attribute not set properly by SetAttributeFailSafe(10s [positive limit]) via StringValue");
809 NS_TEST_ASSERT_MSG_EQ (ok,
false,
"Unexpectedly could SetAttributeFailSafe() via TimeValue to 11s [greater than positive limit]");
811 ok = CheckGetCodePaths (p,
"TestTimeWithBounds",
"+1e+10ns",
TimeValue (
Seconds (10)));
820 ok = CheckGetCodePaths (p,
"TestTimeWithBounds",
"-5e+09ns",
TimeValue (
Seconds (-5)));
821 NS_TEST_ASSERT_MSG_EQ (ok,
true,
"Attribute not set properly by SetAttributeFailSafe(-5s [negative limit]) via StringValue");
829 ok = CheckGetCodePaths (p,
"TestTimeWithBounds",
"-5e+09ns",
TimeValue (
Seconds (-5)));
852 virtual void DoRun (
void);
874 p = CreateObject<AttributeObjectTest> ();
902 virtual void DoRun (
void);
915 p = CreateObject<AttributeObjectTest> ();
967 virtual void DoRun (
void);
980 p = CreateObject<AttributeObjectTest> ();
1033 virtual void DoRun (
void);
1047 p = CreateObject<AttributeObjectTest> ();
1073 NS_TEST_ASSERT_MSG_EQ (ok,
false,
"Unexpectedly could SetAttributeFailSafe() via IntegerValue to 128");
1079 NS_TEST_ASSERT_MSG_EQ (ok,
false,
"Unexpectedly could SetAttributeFailSafe() via IntegerValue to -129");
1104 NS_TEST_ASSERT_MSG_EQ (ok,
false,
"Unexpectedly could SetAttributeFailSafe() via IntegerValue to 128");
1110 NS_TEST_ASSERT_MSG_EQ (ok,
false,
"Unexpectedly could SetAttributeFailSafe() via IntegerValue to -129");
1125 virtual void DoRun (
void);
1145 p = CreateObject<AttributeObjectTest> ();
1164 NS_TEST_ASSERT_MSG_EQ (ok,
true,
"Could not TraceConnectWithoutContext() \"Source1\" to NodifySource1()");
1181 NS_TEST_ASSERT_MSG_EQ (ok,
true,
"Could not TraceConnectWithoutContext() \"Source1\" to NodifySource1()");
1201 virtual void DoRun (
void);
1223 p = CreateObject<AttributeObjectTest> ();
1280 virtual void DoRun (
void);
1302 p = CreateObject<AttributeObjectTest> ();
1313 NS_TEST_ASSERT_MSG_EQ (derived, 0,
"Unexpectedly found non-null pointer in newly initialized PointerValue Attribute");
1319 derived = Create<Derived> ();
1321 NS_TEST_ASSERT_MSG_EQ (ok,
true,
"Could not SetAttributeFailSafe() a PointerValue of the correct type");
1339 NS_TEST_ASSERT_MSG_EQ (storedBase, stored,
"Retrieved Ptr<Object> does not match stored Ptr<Derived>");
1357 p2->GetAttribute (
"PointerInitialized", ptr2);
1359 NS_TEST_ASSERT_MSG_NE (storedPtr, storedPtr2,
"ptr and ptr2 both have PointerInitialized pointing to the same object");
1361 p2->GetAttribute (
"PointerInitialized", ptr3);
1363 NS_TEST_ASSERT_MSG_NE (storedPtr, storedPtr3,
"ptr and ptr3 both have PointerInitialized pointing to the same object");
1369 factory.
SetTypeId (
"ns3::AttributeObjectTest");
1370 factory.
Set (
"PointerInitialized",
StringValue (
"ns3::Derived"));
1382 NS_TEST_ASSERT_MSG_NE (storedPtr4, storedPtr5,
"aotPtr and aotPtr2 are unique, but their Derived member is not");
1404 virtual void DoRun (
void);
1426 p = CreateObject<AttributeObjectTest> ();
void InvokeCbValue(int8_t a)
int16_t m_int16WithBounds
TracedValue< enum Test_e > m_enumSrc
std::istream & operator>>(std::istream &is, Angles &a)
initialize a struct Angles from input
Simulation virtual time values and global simulation resolution.
virtual ~RandomVariableStreamAttributeTestCase()
bool SetDefaultFailSafe(std::string fullName, const AttributeValue &value)
Ptr< Derived > m_ptrInitialized2
Ptr< const AttributeAccessor > MakeValueClassTestAccessor(T1 a1)
TypeId AddConstructor(void)
Record in this TypeId the fact that the default constructor is accessible.
AttributeValue implementation for Boolean.
TracedValue< uint8_t > m_uintSrc
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
bool CheckGetCodePaths(Ptr< Object > p, std::string attributeName, std::string expectedString, T expectedValue)
virtual ~AttributeObjectTest(void)
Ptr< Derived > m_ptrInitialized
int16_t DoGetInt16(void) const
Ptr< Derived > DoGetVector(std::size_t i) const
Hold variables of type string.
virtual void DoRun(void)
Implementation to actually run this TestCase.
void NotifySource2(double a, int b, float c)
bool DoGetTestB(void) const
#define ATTRIBUTE_HELPER_CPP(type)
Define the attribute value, accessor and checkers for class type
virtual void DoRun(void)
Implementation to actually run this TestCase.
Ptr< const AttributeAccessor > MakeBooleanAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method...
std::vector< Ptr< Derived > > m_vector2
Ptr< const AttributeAccessor > MakeObjectVectorAccessor(U T::*memberVariable)
MakeAccessorHelper implementation for ObjectVector.
void Set(const std::string &name, const AttributeValue &value, Args &&... args)
Set an attribute to be set during construction.
Hold a signed integer type.
void SetTypeId(TypeId tid)
Set the TypeId of the Objects to be created by this factory.
#define NS_UNUSED(x)
Mark a local variable as unused.
bool SetAttributeFailSafe(std::string name, const AttributeValue &value)
Set a single attribute without raising errors.
Callback< void, int8_t > m_cbValue
ObjectMapAttributeTestCase(std::string description)
RandomVariableStreamAttributeTestCase(std::string description)
std::map< uint32_t, Ptr< Derived > > m_map1
bool GetAttributeFailSafe(std::string name, AttributeValue &value) const
Get the value of an attribute without raising erros.
IntegerTraceSourceAttributeTestCase(std::string description)
void NotifyCallbackValue(int8_t a)
virtual ~CallbackValueTestCase()
AttributeValue implementation for Callback.
Ptr< const TraceSourceAccessor > MakeTraceSourceAccessor(T a)
Create a TraceSourceAccessor which will control access to the underlying trace source.
Ptr< const AttributeAccessor > MakeIntegerAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method...
virtual void DoRun(void)
Implementation to actually run this TestCase.
std::vector< Ptr< Derived > > m_vector1
TracedCallbackTestCase(std::string description)
Ptr< const AttributeAccessor > MakePointerAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method...
std::string Get(void) const
Hold variables of type enum.
TracedValue< int8_t > m_intSrc2
AttributeValue implementation for Time.
Ptr< Object > Create(void) const
Create an Object instance of the configured TypeId.
void AddTestCase(TestCase *testCase, TestDuration duration=QUICK)
Add an individual child TestCase to this test suite.
Ptr< const AttributeChecker > MakeCallbackChecker(void)
Hold an unsigned integer type.
void NotifySource2(double a, int b, float c)
virtual void DoRun(void)
Implementation to actually run this TestCase.
Ptr< const AttributeAccessor > MakeEnumAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method...
#define NS_TEST_ASSERT_MSG_EQ(actual, limit, msg)
Test that an actual and expected (limit) value are equal and report and abort if not.
IntegerTraceSourceTestCase(std::string description)
Ptr< const AttributeAccessor > MakeCallbackAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method...
virtual void DoRun(void)
Implementation to actually run this TestCase.
void NotifySource1(int8_t old, int8_t n)
bool TraceDisconnectWithoutContext(std::string name, const CallbackBase &cb)
Disconnect from a TraceSource a Callback previously connected without a context.
TracedValue< int8_t > m_intSrc1
std::size_t GetN(void) const
Get the number of Objects.
virtual ~PointerAttributeTestCase()
void AddToMap1(uint32_t i)
TracedCallback< double, int, float > m_cb
void DoSetInt16(int16_t v)
AttributeObjectTest(void)
std::ostream & operator<<(std::ostream &os, const Angles &a)
print a struct Angles to output
Ptr< T > GetObject(void) const
Get a pointer to the requested aggregated Object.
bool TraceConnectWithoutContext(std::string name, const CallbackBase &cb)
Connect a TraceSource to a Callback without a context.
TracedValue< ValueClassTest > m_valueSrc
bool operator!=(Callback< R, T1, T2, T3, T4, T5, T6, T7, T8, T9 > a, Callback< R, T1, T2, T3, T4, T5, T6, T7, T8, T9 > b)
Inequality test.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
std::size_t DoGetVectorN(void) const
Callback< void, int8_t > m_cbValue
Hold objects of type Ptr<T>.
virtual ~AttributeTestCase()
int8_t DoGetIntSrc(void) const
ObjectVectorAttributeTestCase(std::string description)
Ptr< Object > Get(std::size_t i) const
Get a specific Object.
virtual void DoRun(void)
Implementation to actually run this TestCase.
Ptr< const AttributeAccessor > MakeTimeAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method...
virtual ~ObjectMapAttributeTestCase()
static AttributesTestSuite attributesTestSuite
void InvokeCb(double a, int b, float c)
TracedValue< double > m_doubleSrc
Ptr< const AttributeAccessor > MakeDoubleAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method...
Instantiate subclasses of ns3::Object.
AttributeTestCase(std::string description)
virtual void DoRun(void)
Implementation to actually run this TestCase.
static TypeId GetTypeId(void)
#define NS_TEST_ASSERT_MSG_NE(actual, limit, msg)
Test that an actual and expected (limit) value are not equal and report and abort if not...
bool DoSetIntSrc(int8_t v)
Time Seconds(double value)
Construct a Time in the indicated unit.
void SetDefault(std::string name, const AttributeValue &value)
Ptr< const AttributeChecker > MakeBooleanChecker(void)
Ptr< const AttributeChecker > MakeEnumChecker(int v, std::string n, Ts... args)
Make an EnumChecker pre-configured with a set of allowed values by name.
void NotifyCallbackValue(int8_t a)
virtual ~ObjectVectorAttributeTestCase()
virtual ~TracedCallbackTestCase()
Ptr< const AttributeChecker > MakeTimeChecker(const Time min, const Time max)
Helper to make a Time checker with bounded range.
static TypeId GetTypeId(void)
Ptr< const AttributeAccessor > MakeObjectMapAccessor(U T::*memberVariable)
MakeAccessorHelper implementation for ObjectVector.
Test_e DoGetEnum(void) const
Ptr< RandomVariableStream > m_random
Test class for TracedValue callbacks.
A base class which provides memory management and object aggregation.
void InvokeCbValue(int8_t a)
Container for a set of ns3::Object pointers.
TracedValue< bool > m_boolSrc
bool IsNull(void) const
Check for null implementation.
PointerAttributeTestCase(std::string description)
This class can be used to hold variables of floating point type such as 'double' or 'float'...
Ptr< const AttributeAccessor > MakeUintegerAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method...
a unique identifier for an interface.
Ptr< const AttributeChecker > MakeValueClassTestChecker(void)
CallbackValueTestCase(std::string description)
#define ATTRIBUTE_HELPER_HEADER(type)
Declare the attribute value, accessor and checkers for class type
void GetAttribute(std::string name, AttributeValue &value) const
Get the value of an attribute, raising fatal errors if unsuccessful.
virtual ~IntegerTraceSourceAttributeTestCase()
Callback< R, Ts... > MakeCallback(R(T::*memPtr)(Ts...), OBJ objPtr)
Build Callbacks for class method members which take varying numbers of arguments and potentially retu...
virtual ~IntegerTraceSourceTestCase()
Callback< void, int8_t > m_cbValue
virtual void DoRun(void)
Implementation to actually run this TestCase.
void InvokeCbValue(int8_t a)
virtual void DoRun(void)
Implementation to actually run this TestCase.