Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ruanhaishen
NLua
Commits
ead94f06
"packages/KeraLua.1.0.4/lib/netcoreapp2.0/KeraLua.xml" did not exist on "75de25cd1ce6d1f6a4d429eb19c8e72082848925"
Commit
ead94f06
authored
Feb 12, 2013
by
Vinicius Jarina
Browse files
Fixed EventException test. (iOS)
parent
0403b1fd
Changes
1
Show whitespace changes
Inline
Side-by-side
tests/LuaTests.cs
View file @
ead94f06
...
...
@@ -292,6 +292,17 @@ namespace LuaInterfaceTest
return
val
*
val2
;
}
class
LuaEventArgsHandler
:
LuaInterface
.
Method
.
LuaDelegate
{
void
CallFunction
(
object
sender
,
EventArgs
eventArgs
)
{
object
[]
args
=
new
object
[]
{
sender
,
eventArgs
};
object
[]
inArgs
=
new
object
[]
{
sender
,
eventArgs
};
int
[]
outArgs
=
new
int
[]
{
};
base
.
callFunction
(
args
,
inArgs
,
outArgs
);
}
}
[
Test
]
public
void
TestEventException
()
...
...
@@ -300,6 +311,7 @@ namespace LuaInterfaceTest
//Register a C# function
MethodInfo
testException
=
this
.
GetType
().
GetMethod
(
"_TestException"
,
BindingFlags
.
NonPublic
|
BindingFlags
.
Public
|
BindingFlags
.
DeclaredOnly
|
BindingFlags
.
Instance
,
null
,
new
Type
[]
{
typeof
(
float
),
typeof
(
float
)
},
null
);
lua
.
RegisterFunction
(
"Multiply"
,
this
,
testException
);
lua
.
RegisterLuaDelegateType
(
typeof
(
EventHandler
<
EventArgs
>),
typeof
(
LuaEventArgsHandler
));
//create the lua event handler code for the entity
//includes the bad code!
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment