OLD | NEW |
1 #include <AdblockPlus.h> | 1 #include <AdblockPlus.h> |
2 #include <fstream> | 2 #include <fstream> |
3 #include <gtest/gtest.h> | 3 #include <gtest/gtest.h> |
4 #include <sstream> | 4 #include <sstream> |
5 | 5 |
6 class BaseFileSystem : public AdblockPlus::FileSystem | 6 class BaseFileSystem : public AdblockPlus::FileSystem |
7 { | 7 { |
8 void Write(const std::string& path, | 8 void Write(const std::string& path, |
9 std::tr1::shared_ptr<std::ostream> content) | 9 std::tr1::shared_ptr<std::ostream> content) |
10 { | 10 { |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
118 ASSERT_TRUE(value->IsString()); | 118 ASSERT_TRUE(value->IsString()); |
119 ASSERT_EQ("foo", value->AsString()); | 119 ASSERT_EQ("foo", value->AsString()); |
120 | 120 |
121 value = jsEngine.NewValue(12); | 121 value = jsEngine.NewValue(12); |
122 ASSERT_TRUE(value->IsNumber()); | 122 ASSERT_TRUE(value->IsNumber()); |
123 ASSERT_EQ(12, value->AsInt()); | 123 ASSERT_EQ(12, value->AsInt()); |
124 | 124 |
125 value = jsEngine.NewValue(true); | 125 value = jsEngine.NewValue(true); |
126 ASSERT_TRUE(value->IsBool()); | 126 ASSERT_TRUE(value->IsBool()); |
127 ASSERT_TRUE(value->AsBool()); | 127 ASSERT_TRUE(value->AsBool()); |
| 128 |
| 129 value = jsEngine.NewObject(); |
| 130 ASSERT_TRUE(value->IsObject()); |
| 131 ASSERT_EQ(0u, value->GetOwnPropertyNames().size()); |
128 } | 132 } |
OLD | NEW |