forked from bblanchon/ArduinoJson
Updated copyright year from 2016 to 2017
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
// Copyright Benoit Blanchon 2014-2016
|
||||
// Copyright Benoit Blanchon 2014-2017
|
||||
// MIT License
|
||||
//
|
||||
// Arduino JSON library
|
||||
@ -16,13 +16,21 @@ class StringBuilderTests : public testing::Test {
|
||||
_stringBuilder = new StaticStringBuilder(_buffer, sizeof(_buffer));
|
||||
}
|
||||
|
||||
virtual void TearDown() { delete _stringBuilder; }
|
||||
virtual void TearDown() {
|
||||
delete _stringBuilder;
|
||||
}
|
||||
|
||||
void print(const char *value) { _returnValue = _stringBuilder->print(value); }
|
||||
void print(const char *value) {
|
||||
_returnValue = _stringBuilder->print(value);
|
||||
}
|
||||
|
||||
void outputMustBe(const char *expected) { EXPECT_STREQ(expected, _buffer); }
|
||||
void outputMustBe(const char *expected) {
|
||||
EXPECT_STREQ(expected, _buffer);
|
||||
}
|
||||
|
||||
void resultMustBe(size_t expected) { EXPECT_EQ(expected, _returnValue); }
|
||||
void resultMustBe(size_t expected) {
|
||||
EXPECT_EQ(expected, _returnValue);
|
||||
}
|
||||
|
||||
private:
|
||||
char _buffer[20];
|
||||
@ -30,7 +38,9 @@ class StringBuilderTests : public testing::Test {
|
||||
size_t _returnValue;
|
||||
};
|
||||
|
||||
TEST_F(StringBuilderTests, InitialState) { outputMustBe(""); }
|
||||
TEST_F(StringBuilderTests, InitialState) {
|
||||
outputMustBe("");
|
||||
}
|
||||
|
||||
TEST_F(StringBuilderTests, OverCapacity) {
|
||||
print("ABCDEFGHIJKLMNOPQRSTUVWXYZ");
|
||||
|
Reference in New Issue
Block a user