File tree Expand file tree Collapse file tree 1 file changed +11
-7
lines changed Expand file tree Collapse file tree 1 file changed +11
-7
lines changed Original file line number Diff line number Diff line change @@ -11,18 +11,22 @@ using namespace ArduinoJson::Internals;
11
11
12
12
class StringBuilderTests : public testing ::Test {
13
13
protected:
14
- virtual void SetUp () { sb = new StringBuilder (buffer, sizeof (buffer)); }
14
+ virtual void SetUp () {
15
+ _stringBuilder = new StringBuilder (_buffer, sizeof (_buffer));
16
+ }
15
17
16
- void print ( const char *value ) { returnValue = sb-> print (value) ; }
18
+ virtual void TearDown ( ) { delete _stringBuilder ; }
17
19
18
- void outputMustBe (const char *expected ) { EXPECT_STREQ (expected, buffer ); }
20
+ void print (const char *value ) { _returnValue = _stringBuilder-> print (value ); }
19
21
20
- void resultMustBe (size_t expected) { EXPECT_EQ (expected, returnValue); }
22
+ void outputMustBe (const char *expected) { EXPECT_STREQ (expected, _buffer); }
23
+
24
+ void resultMustBe (size_t expected) { EXPECT_EQ (expected, _returnValue); }
21
25
22
26
private:
23
- char buffer [20 ];
24
- Print *sb ;
25
- size_t returnValue ;
27
+ char _buffer [20 ];
28
+ Print *_stringBuilder ;
29
+ size_t _returnValue ;
26
30
};
27
31
28
32
TEST_F (StringBuilderTests, InitialState) { outputMustBe (" " ); }
You can’t perform that action at this time.
0 commit comments