/
niceSOFT
/
swig
Обзор
Документация
Войти
/
niceSOFT
/
swig
Код
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
Examples/test-suite/javascript/template_classes_runme.js
52 строки
955 B
Momtchil Momtchev
add the last bulk batch of Python tests to JS
01 июн 2023, 14:29
01 июн 2023, 14:29
303b00c
Код
Авторство
О чём код?
var template_classes = require("template_classes"); // This test is just testing incorrect number of arguments/parameters checking point = new template_classes.PointInt(); rectangle = new template_classes.RectangleInt(); rectangle.setPoint(point); rectangle.getPoint(); template_classes.RectangleInt.static_noargs(); template_classes.RectangleInt.static_onearg(1); fail = true; try { rectangle.setPoint(); } catch { fail = false; } if (fail) { throw new Error("argument count check failed"); } fail = true; try { rectangle.getPoint(0); } catch { fail = false; } if (fail) { throw new Error("argument count check failed"); } fail = true; try { RectangleInt.static_noargs(0); } catch { fail = false; } if (fail) { throw new Error("argument count check failed"); } fail = true; try { RectangleInt.static_onearg(); } catch { fail = false; } if (fail) { throw new Error("argument count check failed"); }