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 ThrowingFileReader : public AdblockPlus::FileReader | 6 class ThrowingFileReader : public AdblockPlus::FileReader |
7 { | 7 { |
8 public: | 8 public: |
9 std::auto_ptr<std::istream> Read(const std::string& path) const | 9 std::auto_ptr<std::istream> Read(const std::string& path) const |
10 { | 10 { |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 ASSERT_TRUE(value->IsString()); | 100 ASSERT_TRUE(value->IsString()); |
101 ASSERT_EQ("foo", value->AsString()); | 101 ASSERT_EQ("foo", value->AsString()); |
102 | 102 |
103 value = jsEngine.NewValue(12); | 103 value = jsEngine.NewValue(12); |
104 ASSERT_TRUE(value->IsNumber()); | 104 ASSERT_TRUE(value->IsNumber()); |
105 ASSERT_EQ(12, value->AsInt()); | 105 ASSERT_EQ(12, value->AsInt()); |
106 | 106 |
107 value = jsEngine.NewValue(true); | 107 value = jsEngine.NewValue(true); |
108 ASSERT_TRUE(value->IsBool()); | 108 ASSERT_TRUE(value->IsBool()); |
109 ASSERT_TRUE(value->AsBool()); | 109 ASSERT_TRUE(value->AsBool()); |
| 110 |
| 111 value = jsEngine.NewObject(); |
| 112 ASSERT_TRUE(value->IsObject()); |
| 113 ASSERT_EQ(0u, value->GetOwnPropertyNames().size()); |
110 } | 114 } |
OLD | NEW |