Index: test/JsValue.cpp |
=================================================================== |
--- a/test/JsValue.cpp |
+++ b/test/JsValue.cpp |
@@ -216,20 +216,20 @@ |
} |
TEST_F(JsValueTest, JsValueCallSingleArg) |
{ |
auto func = GetJsEngine().Evaluate("(function(arg) {return arg * 2;})"); |
EXPECT_EQ(10, func.Call(GetJsEngine().NewValue(5)).AsInt()); |
} |
-TEST_F(JsValueTest, ThrowingCoversion) |
+TEST_F(JsValueTest, ThrowingConversion) |
{ |
const std::string source("\ |
function Foo() {\ |
this.toString = function() {throw 'test1';};\ |
this.valueOf = function() {throw 'test2';};\ |
};\ |
new Foo()"); |
auto value = GetJsEngine().Evaluate(source); |
ASSERT_EQ("", value.AsString()); |
- ASSERT_EQ(0, value.AsInt()); |
+ ASSERT_ANY_THROW(value.AsInt()); |
} |