Left: | ||
Right: |
OLD | NEW |
---|---|
(Empty) | |
1 | |
2 #include <string> | |
3 | |
sergei
2018/01/26 22:13:36
Could you please remove the empty lines and add th
hub
2018/01/27 03:33:37
Done.
| |
4 #include "gtest/gtest.h" | |
5 | |
6 #include "compiled/String.h" | |
7 | |
8 TEST(TestString, DependentString) | |
9 { | |
10 DependentString s; | |
11 EXPECT_TRUE(s.is_invalid()); | |
12 | |
13 DependentString s2(s); | |
14 EXPECT_TRUE(s2.is_invalid()); | |
15 } | |
16 | |
17 TEST(TestString, OwnedString) | |
18 { | |
19 OwnedString s; | |
20 EXPECT_TRUE(s.is_invalid()); | |
21 | |
22 // Valid string | |
23 OwnedString s2(2); | |
24 EXPECT_FALSE(s2.is_invalid()); | |
25 | |
26 // Ensure we still have an invalid string. | |
27 OwnedString s3(s); | |
28 EXPECT_TRUE(s3.is_invalid()); | |
29 | |
30 // Empty valid string lead to valid string. | |
31 OwnedString s4(u""_str); | |
32 EXPECT_FALSE(s4.is_invalid()); | |
33 } | |
34 | |
OLD | NEW |