From 18e2cc25cdab66280ba324907387c64c8b6f519d Mon Sep 17 00:00:00 2001 From: Darcy Shen Date: Wed, 22 Nov 2023 16:09:57 +0800 Subject: [PATCH] [2_1] test array of string --- tests/Kernel/Containers/array_test.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tests/Kernel/Containers/array_test.cpp b/tests/Kernel/Containers/array_test.cpp index 3e32fe6a2..deb5f7b4c 100644 --- a/tests/Kernel/Containers/array_test.cpp +++ b/tests/Kernel/Containers/array_test.cpp @@ -101,3 +101,14 @@ TEST_CASE ("test contains") { CHECK_EQ (contains (2, five_elem), true); CHECK_EQ (contains (3, five_elem), true); } + +TEST_CASE ("array of string") { + auto arr= array (); + arr << "Hello" + << "1" + << "2" + << "3"; + CHECK (contains (string ("Hello"), arr)); + arr << "】"; + CHECK (contains (string ("】"), arr)); +}