MCPcopy Create free account
hub / github.com/NativeScript/android / normalTest

Function normalTest

test-app/app/src/main/assets/app/tests/testGC.js:14–39  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

12
13 xit("TestGarbageCollection", function (done) {
14 var normalTest = function () {
15
16 __log("TEST: TestGarbageCollection");
17
18 var obj = new com.tns.tests.ClassX();
19
20 obj.dummy();
21
22 obj = null;
23
24 gc();
25 java.lang.System.gc();
26 gc();
27 java.lang.System.gc();
28 gc();
29 java.lang.System.gc();
30
31 new java.lang.Thread(new java.lang.Runnable("ThreadFunc", {
32 run: function() {
33 var isCollected = com.tns.tests.ClassX.IsCollected;
34 __log('----------> isCollected: ' + isCollected);
35 expect(isCollected).toBe(true);
36 done();
37 }
38 })).start();
39 };
40 normalTest();
41 });
42

Callers 1

testGC.jsFile · 0.85

Calls 3

dummyMethod · 0.95
toBeMethod · 0.80
startMethod · 0.65

Tested by

no test coverage detected