Skip to content

Commit

Permalink
Test for StreamString SSO bug (#6035) (#6041)
Browse files Browse the repository at this point in the history
  • Loading branch information
mongozmaki authored and earlephilhower committed May 3, 2019
1 parent a3c556e commit a67aa56
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tests/host/core/test_string.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#include <string.h>
#include <WString.h>
#include <limits.h>
#include <StreamString.h>

TEST_CASE("String::trim", "[core][String]")
{
Expand Down Expand Up @@ -440,3 +441,14 @@ TEST_CASE("Issue #5949 - Overlapping src/dest in replace", "[core][String]")
blah.replace(blah, blah);
REQUIRE(blah == "blah");
}


TEST_CASE("Issue #2736 - StreamString SSO fix", "[core][StreamString]")
{
StreamString s;
s.print('{');
s.print('\"');
s.print(String("message"));
s.print('\"');
REQUIRE(s == "{\"message\"");
}

0 comments on commit a67aa56

Please sign in to comment.