2 var liba
= require("../liba");
3 function do_leak_check() {
4 for (const arg
of arguments
) {
7 if (liba
.do_leak_check
) {
11 console
.log("version", liba
.VERSION
);
12 console
.log("major", liba
.version
.MAJOR
);
13 console
.log("minor", liba
.version
.MINOR
);
14 console
.log("patch", liba
.version
.PATCH
);
15 console
.log("tweak", liba
.version
.TWEAK
);
16 var v
= new liba
.version();
17 console
.log(v
.toString());
19 var v
= new liba
.version(1);
20 console
.log(v
.toString());
22 var v
= new liba
.version(1, 2);
23 console
.log(v
.toString());
25 var v
= new liba
.version(1, 2, 3);
26 console
.log(v
.major
, v
.minor
, v
.third
, v
.alpha
, v
.extra
);
27 console
.log(v
.parse("3.2.1").toString());
28 console
.log(liba
.version
.check(0, 0, 0));
29 var w
= new liba
.version(1, 2, 0, 0);
30 console
.log(v
.cmp(w
));
31 v
.major
= v
.minor
= v
.third
= v
.extra
= 0;