150 lines
5.4 KiB
JavaScript
150 lines
5.4 KiB
JavaScript
const {assert} = require('chai');
|
|
const Event = require('../src/r3/r3-event.js');
|
|
|
|
//GENERATED_COMPONENT_IMPORTS_START
|
|
const ComponentCode = require('../src/r3/r3-component/./r3-component-code.js');
|
|
const ComponentDOM = require('../src/r3/r3-component/./r3-component-d-o-m.js');
|
|
const ComponentCanvas = require('../src/r3/r3-component/./r3-component-canvas.js');
|
|
const ComponentGeometry = require('../src/r3/r3-component/./r3-component-geometry.js');
|
|
const ComponentBufferGeometry = require('../src/r3/r3-component/./r3-component-buffer-geometry.js');
|
|
const ComponentPlaneGeometry = require('../src/r3/r3-component/./r3-component-plane-geometry.js');
|
|
const ComponentGraphics = require('../src/r3/r3-component/./r3-component-graphics.js');
|
|
const ComponentImage = require('../src/r3/r3-component/./r3-component-image.js');
|
|
const ComponentInput = require('../src/r3/r3-component/./r3-component-input.js');
|
|
const ComponentTouch = require('../src/r3/r3-component/./r3-component-touch.js');
|
|
const ComponentMaterial = require('../src/r3/r3-component/./r3-component-material.js');
|
|
const ComponentMesh = require('../src/r3/r3-component/./r3-component-mesh.js');
|
|
const ComponentTexture = require('../src/r3/r3-component/./r3-component-texture.js');
|
|
//GENERATED_COMPONENT_IMPORTS_END
|
|
|
|
//GENERATED_ENTITY_IMPORTS_START
|
|
const EntitySlider = require('../src/r3/r3-entity/./r3-entity-slider.js');
|
|
//GENERATED_ENTITY_IMPORTS_END
|
|
|
|
//GENERATED_RUNTIME_IMPORTS_START
|
|
const RuntimeCoder = require('../src/r3/r3-runtime/./r3-runtime-coder.js');
|
|
const RuntimeCodeMirror = require('../src/r3/r3-runtime/./r3-runtime-code-mirror.js');
|
|
const RuntimeDOM = require('../src/r3/r3-runtime/./r3-runtime-d-o-m.js');
|
|
const RuntimeDocument = require('../src/r3/r3-runtime/./r3-runtime-document.js');
|
|
const RuntimeGUI = require('../src/r3/r3-runtime/./r3-runtime-g-u-i.js');
|
|
const RuntimeControlKit = require('../src/r3/r3-runtime/./r3-runtime-control-kit.js');
|
|
const RuntimeGraphics = require('../src/r3/r3-runtime/./r3-runtime-graphics.js');
|
|
const RuntimeThree = require('../src/r3/r3-runtime/./r3-runtime-three.js');
|
|
const RuntimeImage = require('../src/r3/r3-runtime/./r3-runtime-image.js');
|
|
const RuntimeNodeJSImage = require('../src/r3/r3-runtime/./r3-runtime-node-j-s-image.js');
|
|
const RuntimeWebImage = require('../src/r3/r3-runtime/./r3-runtime-web-image.js');
|
|
const RuntimePhysics = require('../src/r3/r3-runtime/./r3-runtime-physics.js');
|
|
const RuntimeBullet = require('../src/r3/r3-runtime/./r3-runtime-bullet.js');
|
|
const RuntimeSocket = require('../src/r3/r3-runtime/./r3-runtime-socket.js');
|
|
const RuntimeStatistics = require('../src/r3/r3-runtime/./r3-runtime-statistics.js');
|
|
const RuntimeStats = require('../src/r3/r3-runtime/./r3-runtime-stats.js');
|
|
//GENERATED_RUNTIME_IMPORTS_END
|
|
|
|
//GENERATED_R3_OBJECT_IMPORTS_START
|
|
const Project = require('../src/r3/r3-object/./r3-project.js');
|
|
//GENERATED_R3_OBJECT_IMPORTS_END
|
|
|
|
describe('R3 Tests', () => {
|
|
|
|
it (
|
|
'R3 loads',
|
|
() => {
|
|
|
|
const R3 = require('../src/r3/');
|
|
|
|
assert.typeOf(R3.Version, 'string');
|
|
assert.typeOf(R3.CompileDate, 'string');
|
|
|
|
console.log('R3 Version : ' + R3.Version);
|
|
console.log('R3 Compile Date : ' + R3.CompileDate);
|
|
|
|
}
|
|
);
|
|
|
|
it (
|
|
'Creation of all components succeed',
|
|
() => {
|
|
|
|
//GENERATED_COMPONENT_CREATE_START
|
|
const componentCode = new ComponentCode();
|
|
const componentDOM = new ComponentDOM();
|
|
const componentCanvas = new ComponentCanvas();
|
|
const componentGeometry = new ComponentGeometry();
|
|
const componentBufferGeometry = new ComponentBufferGeometry();
|
|
const componentPlaneGeometry = new ComponentPlaneGeometry();
|
|
const componentGraphics = new ComponentGraphics();
|
|
const componentImage = new ComponentImage();
|
|
const componentInput = new ComponentInput();
|
|
const componentTouch = new ComponentTouch();
|
|
const componentMaterial = new ComponentMaterial();
|
|
const componentMesh = new ComponentMesh();
|
|
const componentTexture = new ComponentTexture();
|
|
//GENERATED_COMPONENT_CREATE_END
|
|
|
|
}
|
|
);
|
|
|
|
it (
|
|
'Creation of all entities succeed',
|
|
() => {
|
|
|
|
//GENERATED_ENTITY_CREATE_START
|
|
const entitySlider = new EntitySlider();
|
|
//GENERATED_ENTITY_CREATE_END
|
|
|
|
}
|
|
);
|
|
|
|
it (
|
|
'Creation of all runtimes succeed',
|
|
() => {
|
|
|
|
//GENERATED_RUNTIME_CREATE_START
|
|
const runtimeCoder = new RuntimeCoder();
|
|
const runtimeCodeMirror = new RuntimeCodeMirror();
|
|
const runtimeDOM = new RuntimeDOM();
|
|
const runtimeDocument = new RuntimeDocument();
|
|
const runtimeGUI = new RuntimeGUI();
|
|
const runtimeControlKit = new RuntimeControlKit();
|
|
const runtimeGraphics = new RuntimeGraphics();
|
|
const runtimeThree = new RuntimeThree();
|
|
const runtimeImage = new RuntimeImage();
|
|
const runtimeNodeJSImage = new RuntimeNodeJSImage();
|
|
const runtimeWebImage = new RuntimeWebImage();
|
|
const runtimePhysics = new RuntimePhysics();
|
|
const runtimeBullet = new RuntimeBullet();
|
|
const runtimeSocket = new RuntimeSocket();
|
|
const runtimeStatistics = new RuntimeStatistics();
|
|
const runtimeStats = new RuntimeStats();
|
|
//GENERATED_RUNTIME_CREATE_END
|
|
|
|
}
|
|
);
|
|
|
|
it (
|
|
'Creation of all objects succeed',
|
|
() => {
|
|
|
|
//GENERATED_R3_OBJECT_CREATE_START
|
|
const project = new Project();
|
|
//GENERATED_R3_OBJECT_CREATE_END
|
|
|
|
}
|
|
);
|
|
|
|
it (
|
|
'Linking system calls createInstance() in the right order',
|
|
() => {
|
|
|
|
const project = new Project();
|
|
const canvas = new ComponentCanvas();
|
|
const slider = new EntitySlider();
|
|
const touch = new ComponentTouch();
|
|
const texture = new ComponentTexture();
|
|
|
|
}
|
|
);
|
|
|
|
});
|
|
|