@@ -49,9 +49,9 @@ TEST(ReaderBase_Derived_Class)
4949 std::shared_ptr<Frame> GetFrame (int64_t number) { std::shared_ptr<Frame> f (new Frame ()); return f; }
5050 void Close () { };
5151 void Open () { };
52- string Json () const { return NULL ; };
52+ string Json () const { return " " ; };
5353 void SetJson (string value) { };
54- Json::Value JsonValue () const { return ( int ) NULL ; };
54+ Json::Value JsonValue () const { return Json::Value ( " {} " ) ; };
5555 void SetJsonValue (Json::Value root) { };
5656 bool IsOpen () { return true ; };
5757 string Name () { return " TestReader" ; };
@@ -60,6 +60,23 @@ TEST(ReaderBase_Derived_Class)
6060 // Create an instance of the derived class
6161 TestReader t1;
6262
63+ // Validate the new class
64+ CHECK_EQUAL (" TestReader" , t1.Name ());
65+
66+ t1.Close ();
67+ t1.Open ();
68+ CHECK_EQUAL (true , t1.IsOpen ());
69+
70+ CHECK_EQUAL (true , t1.GetCache () == NULL );
71+
72+ t1.SetJson (" { }" );
73+ t1.SetJsonValue (Json::Value (" {}" ));
74+ CHECK_EQUAL (" " , t1.Json ());
75+ auto json = t1.JsonValue ();
76+ CHECK_EQUAL (json, Json::Value (" {}" ));
77+
78+ auto f = t1.GetFrame (1 );
79+
6380 // Check some of the default values of the FileInfo struct on the base class
6481 CHECK_EQUAL (false , t1.info .has_audio );
6582 CHECK_EQUAL (false , t1.info .has_audio );
0 commit comments