"packages/KeraLua.1.0.27/lib/xamarinmac/KeraLua.xml" did not exist on "d975f8e96b97513a8b9ed6040d6dec294debbcf8"
Commit be5ea9b0 authored by Eonstorm's avatar Eonstorm
Browse files

Corrected the ThrowException test to check the proper exception message.

Reference Issue 21.


git-svn-id: http://luainterface.googlecode.com/svn/trunk@16 63eb109e-e254-0410-a61e-ed0b8f8614f5
parent c5849187
......@@ -980,7 +980,11 @@ namespace LuaInterface.Tests
bool err = (bool)_Lua["err"];
Exception errMsg = (Exception)_Lua["errMsg"];
TestOk(!err);
TestOk("exception test" == errMsg.Message);
TestOk(errMsg.InnerException != null);
if (errMsg.InnerException != null)
{
TestOk("exception test" == errMsg.InnerException.Message);
}
//Console.WriteLine("interface returned: "+errMsg.ToString());
Destroy();
......@@ -1294,7 +1298,7 @@ namespace LuaInterface.Tests
{
_Lua.DoString("thiswillthrowanerror", "MyChunk");
}
catch(Exception e)
catch (Exception e)
{
if (e.Message.StartsWith("[string \"MyChunk\"]"))
Console.WriteLine("Chunk overload passed");
......@@ -1358,7 +1362,7 @@ namespace LuaInterface.Tests
if (!classWithGenericMethod.GenericMethodSuccess || (classWithGenericMethod.PassedValue as TestClass).val != 56)
passed = false;
if(passed)
if (passed)
Console.WriteLine("Class with generic method passed");
else
Console.WriteLine("Class with generic method failed");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment