initial commit
This commit is contained in:
commit
4b60ece582
327 changed files with 28286 additions and 0 deletions
40
libjs/wTest/uint64.js
Normal file
40
libjs/wTest/uint64.js
Normal file
|
@ -0,0 +1,40 @@
|
|||
"use strict";
|
||||
var WTest = require("./test");
|
||||
var Uint64 = require("../wType/uint64");
|
||||
|
||||
var TUint64 = WTest.inherit({
|
||||
"className": "TUint64",
|
||||
"constructor": function() {
|
||||
WTest.fn.constructor.call(this, "Uint64");
|
||||
|
||||
this._actions.push(this.testEq);
|
||||
this._actions.push(this.testGt);
|
||||
this._actions.push(this.testLt);
|
||||
},
|
||||
"testEq": function() {
|
||||
var first = new Uint64(5);
|
||||
var second = new Uint64(5);
|
||||
|
||||
if (!first["=="](second)) {
|
||||
throw new Error("problem with equals low");
|
||||
}
|
||||
},
|
||||
"testGt": function() {
|
||||
var first = new Uint64(5);
|
||||
var second = new Uint64(4);
|
||||
|
||||
if (!first[">"](second)) {
|
||||
throw new Error("problem with greater low");
|
||||
}
|
||||
},
|
||||
"testLt": function() {
|
||||
var first = new Uint64(4);
|
||||
var second = new Uint64(5);
|
||||
|
||||
if (!first["<"](second)) {
|
||||
throw new Error("problem with lower low");
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
module.exports = TUint64;
|
Loading…
Add table
Add a link
Reference in a new issue