Index: test/JsEngine.cpp |
=================================================================== |
--- a/test/JsEngine.cpp |
+++ b/test/JsEngine.cpp |
@@ -10,16 +10,17 @@ |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
* GNU General Public License for more details. |
* |
* You should have received a copy of the GNU General Public License |
* along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>. |
*/ |
+#include <stdexcept> |
#include "BaseJsTest.h" |
namespace |
{ |
class JsEngineTest : public BaseJsTest |
{ |
}; |
@@ -35,22 +36,22 @@ TEST_F(JsEngineTest, Evaluate) |
jsEngine->Evaluate("function hello() { return 'Hello'; }"); |
AdblockPlus::JsValuePtr result = jsEngine->Evaluate("hello()"); |
ASSERT_TRUE(result->IsString()); |
ASSERT_EQ("Hello", result->AsString()); |
} |
TEST_F(JsEngineTest, RuntimeExceptionIsThrown) |
{ |
- ASSERT_THROW(jsEngine->Evaluate("doesnotexist()"), AdblockPlus::JsError); |
+ ASSERT_THROW(jsEngine->Evaluate("doesnotexist()"), std::runtime_error); |
} |
TEST_F(JsEngineTest, CompileTimeExceptionIsThrown) |
{ |
- ASSERT_THROW(jsEngine->Evaluate("'foo'bar'"), AdblockPlus::JsError); |
+ ASSERT_THROW(jsEngine->Evaluate("'foo'bar'"), std::runtime_error); |
} |
TEST_F(JsEngineTest, ValueCreation) |
{ |
AdblockPlus::JsValuePtr value; |
value = jsEngine->NewValue("foo"); |
ASSERT_TRUE(value->IsString()); |