/
niceSOFT
/
swig
Обзор
Документация
Войти
/
niceSOFT
/
swig
Код
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
Examples/test-suite/javascript/constant_directive_runme.js
36 строк
1 KB
Olly Betts
[js] Add _runme.js files for ynit tests that pass
21 май 2023, 23:18
21 май 2023, 23:18
5eedba4
Код
Авторство
О чём код?
var constant_directive = require("constant_directive"); if (!constant_directive.TYPE1_CONSTANT1 instanceof constant_directive.Type1) { throw new Error("Failure: TYPE1_CONSTANT1 type: " + typeof constant_directive.TYPE1_CONSTANT1); } if (!constant_directive.getType1Instance() instanceof constant_directive.Type1) { throw new Error("Failure: getType1Instance() type: " + typeof constant_directive.getType1Instance()); } if (constant_directive.TYPE1_CONSTANT1.val != 1) { throw new Error("constant_directive.TYPE1_CONSTANT1.val is %r (should be 1) " + constant_directive.TYPE1_CONSTANT1.val); } if (constant_directive.TYPE1_CONSTANT2.val != 2) { throw new Error("constant_directive.TYPE1_CONSTANT2.val is %r (should be 2) " + constant_directive.TYPE1_CONSTANT2.val); } if (constant_directive.TYPE1_CONSTANT3.val != 3) { throw new Error("constant_directive.TYPE1_CONSTANT3.val is %r (should be 3) " + constant_directive.TYPE1_CONSTANT3.val); } if (constant_directive.TYPE1CONST_CONSTANT1.val != 1) { throw new Error("constant_directive.TYPE1CONST_CONSTANT1.val is %r (should be 1) " + constant_directive.TYPE1CONST_CONSTANT1.val); } if (constant_directive.TYPE1CPTR_CONSTANT1.val != 1) { throw new Error("constant_directive.TYPE1CPTR_CONSTANT1.val is %r (should be 1) " + constant_directive.TYPE1CPTR_CONSTANT1.val); }