Add some test runners.
This commit is contained in:
parent
b9ecf75f17
commit
2efe63ebb2
5 changed files with 109 additions and 0 deletions
22
Examples/test-suite/javascript/disown_runme.js
Normal file
22
Examples/test-suite/javascript/disown_runme.js
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
var disown = require("./disown");
|
||||
|
||||
var a = new disown.A();
|
||||
var tmp = a.thisown;
|
||||
a.thisown = 0
|
||||
if (a.thisown) {
|
||||
throw new Error("Failed.");
|
||||
}
|
||||
a.thisown = 1
|
||||
if (!a.thisown) {
|
||||
throw new Error("Failed.");
|
||||
}
|
||||
a.thisown = tmp
|
||||
if (a.thisown != tmp) {
|
||||
throw new Error("Failed.");
|
||||
}
|
||||
|
||||
var b = new disown.B();
|
||||
b.acquire(a);
|
||||
if (a.thisown) {
|
||||
throw new Error("Failed.");
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue