mirror of
https://github.com/apache/nuttx-apps.git
synced 2026-08-01 20:29:00 +00:00
cxxtest: Add static string test.
Signed-off-by: cuiziwei <cuiziwei@xiaomi.com>
This commit is contained in:
parent
bb03ef0ce3
commit
2a76d17e10
1 changed files with 4 additions and 0 deletions
|
|
@ -172,6 +172,10 @@ static void test_stl()
|
|||
std::printf("v1=%d %d %d\n", v1[0], v1[1], v1[2]);
|
||||
assert(v1[2] == 3);
|
||||
|
||||
static const std::string s1 = "Hello, World!";
|
||||
std::printf("s1=%s\n", s1.c_str());
|
||||
assert(s1 == "Hello, World!");
|
||||
|
||||
std::vector<int> v2 = v1;
|
||||
assert(v2 == v1);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue