This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx-apps.git


The following commit(s) were added to refs/heads/master by this push:
     new 2a76d17e1 cxxtest: Add static string test.
2a76d17e1 is described below

commit 2a76d17e10ca8fdf466c35ffffd120614242789f
Author: cuiziwei <cuizi...@xiaomi.com>
AuthorDate: Wed Nov 13 10:24:06 2024 +0800

    cxxtest: Add static string test.
    
    Signed-off-by: cuiziwei <cuizi...@xiaomi.com>
---
 testing/cxxtest/cxxtest_main.cxx | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/testing/cxxtest/cxxtest_main.cxx b/testing/cxxtest/cxxtest_main.cxx
index 227562fee..08cd36227 100644
--- a/testing/cxxtest/cxxtest_main.cxx
+++ b/testing/cxxtest/cxxtest_main.cxx
@@ -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);
 

Reply via email to