File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -123,6 +123,30 @@ TEST(ValueTest, StdStringConstructor)
123123 ASSERT_TRUE (v.isString ());
124124 }
125125
126+ {
127+ Value v (std::string (" 532" ));
128+ ASSERT_EQ (v.toString (), " 532" );
129+ ASSERT_EQ (v.type (), Value::Type::Number);
130+ ASSERT_FALSE (v.isInfinity ());
131+ ASSERT_FALSE (v.isNegativeInfinity ());
132+ ASSERT_FALSE (v.isNaN ());
133+ ASSERT_TRUE (v.isNumber ());
134+ ASSERT_FALSE (v.isBool ());
135+ ASSERT_FALSE (v.isString ());
136+ }
137+
138+ {
139+ Value v (std::string (" 1 2 3" ));
140+ ASSERT_EQ (v.toString (), " 1 2 3" );
141+ ASSERT_EQ (v.type (), Value::Type::String);
142+ ASSERT_FALSE (v.isInfinity ());
143+ ASSERT_FALSE (v.isNegativeInfinity ());
144+ ASSERT_FALSE (v.isNaN ());
145+ ASSERT_FALSE (v.isNumber ());
146+ ASSERT_FALSE (v.isBool ());
147+ ASSERT_TRUE (v.isString ());
148+ }
149+
126150 {
127151 Value v (std::string (" Infinity" ));
128152 ASSERT_EQ (v.toString (), " Infinity" );
You can’t perform that action at this time.
0 commit comments