1
0
forked from 0ad/0ad
0ad/binaries/data/mods/public/simulation/components/tests/test_GuiInterface.js

15 lines
385 B
JavaScript
Raw Normal View History

Engine.LoadComponentScript("GuiInterface.js");
var cmp = ConstructComponent(SYSTEM_ENTITY, "GuiInterface");
TS_ASSERT_UNEVAL_EQUALS(cmp.GetSimulationState(), { test: "simulation state" });
AddMock(10, IID_Position, {
GetPosition: function() {
return {x:1, y:2, z:3};
},
});
var state = cmp.GetEntityState(-1, 10);
TS_ASSERT_UNEVAL_EQUALS(state, { position: {x:1, y:2, z:3} });