MCPcopy Create free account
hub / github.com/Tencent/puerts / Test2

Method Test2

unity/general/Src/UnitTest/ArrayBufferTest.cs:58–77  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

56 }
57
58 [Test]
59 public void Test2()
60 {
61 var jsEnv = new JsEnv(new TxtLoader());
62
63 int ret = jsEnv.Eval<int>(@"
64 const CS = require('csharp');
65 let obj = new CS.Puerts.UnitTest.ArrayBufferClass();
66 let ab = obj.AB;
67 let arr = new Uint8Array(ab,1);
68 ab = arr;
69 let ab2 = obj.AB;
70 let arr2 = new Uint8Array(ab);
71 arr2[1];
72 ");
73
74 jsEnv.Dispose();
75
76 Assert.AreEqual(3, ret);
77 }
78
79 [Test]
80 public void Test3()

Callers 1

M_Test2Method · 0.45

Calls 1

DisposeMethod · 0.45

Tested by

no test coverage detected