Skip to content

Commit 9dcfb77

Browse files
committed
添加对应的测试
1 parent 6ff8f3d commit 9dcfb77

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

unity/test/Src/Cases/Python/CrossLang/GenericTest.cs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,22 @@ public void ListGenericPythonTest()
2525
Assert.AreEqual(res, 6);
2626
pythonEnv.Dispose();
2727
}
28+
29+
[Test]
30+
public void ListGenericWrapperPythonTest()
31+
{
32+
var pythonEnv = new ScriptEnv(new BackendPython());
33+
var res = pythonEnv.Eval<int>(@"
34+
exec('''
35+
import System.Collections.Generic.List as List
36+
import System.String as String
37+
ListString = List[String]
38+
ls = ListString()
39+
ls.Add('hello')
40+
'')
41+
");
42+
pythonEnv.Dispose();
43+
}
2844

2945
[Test]
3046
public void StaticGenericMethodPythonTest()

0 commit comments

Comments
 (0)