Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
gonpombo8 committed Nov 19, 2024
1 parent dfe1416 commit 2ce9016
Show file tree
Hide file tree
Showing 16 changed files with 58 additions and 44 deletions.
8 changes: 8 additions & 0 deletions test/ecs/components/InputModifier.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,12 @@ describe('Generated InputModifier ProtoBuf', () => {
}
})
})
it('should test Standar modifier', () => {
const newEngine = Engine()
const InputModifier = components.InputModifier(newEngine)

testComponentSerialization(InputModifier, {
mode: InputModifier.InputModifier.Standard({ disableAll: true })
})
})
})
8 changes: 6 additions & 2 deletions test/ecs/components/Material.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,9 @@ describe('Generated Material ProtoBuf', () => {
texture: {
wrapMode: TextureWrapMode.TWM_MIRROR,
filterMode: TextureFilterMode.TFM_POINT,
src: 'not-casla'
src: 'not-casla',
tiling: undefined,
offset: undefined
}
}
},
Expand All @@ -87,7 +89,9 @@ describe('Generated Material ProtoBuf', () => {
texture: {
wrapMode: TextureWrapMode.TWM_MIRROR,
filterMode: TextureFilterMode.TFM_TRILINEAR,
src: 'not-casla'
src: 'not-casla',
tiling: undefined,
offset: undefined
}
}
},
Expand Down
12 changes: 7 additions & 5 deletions test/ecs/components/UiBackground.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,17 @@ describe('Generated UiBackground ProtoBuf', () => {
texture: {
src: 'some-src',
wrapMode: TextureWrapMode.TWM_CLAMP,
filterMode: TextureFilterMode.TFM_BILINEAR
filterMode: TextureFilterMode.TFM_BILINEAR,
tiling: undefined,
offset: undefined
}
}
},
textureSlices: {
top: 1 / 3,
left: 1 / 3,
right: 1 / 3,
bottom: 1 / 3
top: 2,
left: 2,
right: 2,
bottom: 2
},
uvs: []
})
Expand Down
6 changes: 3 additions & 3 deletions test/snapshots/development-bundles/static-scene.test.ts.crdt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
SCENE_COMPILED_JS_SIZE_PROD=452.9k bytes
SCENE_COMPILED_JS_SIZE_PROD=453.4k bytes
THE BUNDLE HAS SOURCEMAPS
(start empty vm 0.21.0-3680274614.commit-1808aa1)
OPCODES ~= 0k
Expand All @@ -11,7 +11,7 @@ EVAL test/snapshots/development-bundles/static-scene.test.js
REQUIRE: ~system/EngineApi
REQUIRE: ~system/EngineApi
OPCODES ~= 54k
MALLOC_COUNT = 13672
MALLOC_COUNT = 13673
ALIVE_OBJS_DELTA ~= 2.70k
CALL onStart()
main.crdt: PUT_COMPONENT e=0x200 c=1 t=0 data={"position":{"x":5.880000114440918,"y":2.7916901111602783,"z":7.380000114440918},"rotation":{"x":0,"y":0,"z":0,"w":1},"scale":{"x":1,"y":1,"z":1},"parent":0}
Expand Down Expand Up @@ -56,4 +56,4 @@ CALL onUpdate(0.1)
OPCODES ~= 3k
MALLOC_COUNT = -5
ALIVE_OBJS_DELTA ~= 0.00k
MEMORY_USAGE_COUNT ~= 1193.93k bytes
MEMORY_USAGE_COUNT ~= 1194.79k bytes
6 changes: 3 additions & 3 deletions test/snapshots/development-bundles/testing-fw.test.ts.crdt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
SCENE_COMPILED_JS_SIZE_PROD=453.4k bytes
SCENE_COMPILED_JS_SIZE_PROD=454k bytes
THE BUNDLE HAS SOURCEMAPS
(start empty vm 0.21.0-3680274614.commit-1808aa1)
OPCODES ~= 0k
Expand All @@ -11,7 +11,7 @@ EVAL test/snapshots/development-bundles/testing-fw.test.js
REQUIRE: ~system/EngineApi
REQUIRE: ~system/EngineApi
OPCODES ~= 63k
MALLOC_COUNT = 14193
MALLOC_COUNT = 14194
ALIVE_OBJS_DELTA ~= 2.85k
CALL onStart()
LOG: ["Adding one to position.y=0"]
Expand Down Expand Up @@ -64,4 +64,4 @@ CALL onUpdate(0.1)
OPCODES ~= 5k
MALLOC_COUNT = -40
ALIVE_OBJS_DELTA ~= -0.01k
MEMORY_USAGE_COUNT ~= 1202.54k bytes
MEMORY_USAGE_COUNT ~= 1203.40k bytes
6 changes: 3 additions & 3 deletions test/snapshots/development-bundles/two-way-crdt.test.ts.crdt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
SCENE_COMPILED_JS_SIZE_PROD=453.4k bytes
SCENE_COMPILED_JS_SIZE_PROD=454k bytes
THE BUNDLE HAS SOURCEMAPS
(start empty vm 0.21.0-3680274614.commit-1808aa1)
OPCODES ~= 0k
Expand All @@ -11,7 +11,7 @@ EVAL test/snapshots/development-bundles/two-way-crdt.test.js
REQUIRE: ~system/EngineApi
REQUIRE: ~system/EngineApi
OPCODES ~= 63k
MALLOC_COUNT = 14193
MALLOC_COUNT = 14194
ALIVE_OBJS_DELTA ~= 2.85k
CALL onStart()
LOG: ["Adding one to position.y=0"]
Expand Down Expand Up @@ -64,4 +64,4 @@ CALL onUpdate(0.1)
OPCODES ~= 5k
MALLOC_COUNT = -40
ALIVE_OBJS_DELTA ~= -0.01k
MEMORY_USAGE_COUNT ~= 1202.55k bytes
MEMORY_USAGE_COUNT ~= 1203.41k bytes
2 changes: 1 addition & 1 deletion test/snapshots/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions test/snapshots/production-bundles/append-value-crdt.ts.crdt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
SCENE_COMPILED_JS_SIZE_PROD=197.8k bytes
SCENE_COMPILED_JS_SIZE_PROD=198.1k bytes
(start empty vm 0.21.0-3680274614.commit-1808aa1)
OPCODES ~= 0k
MALLOC_COUNT = 1005
Expand All @@ -9,7 +9,7 @@ EVAL test/snapshots/production-bundles/append-value-crdt.js
REQUIRE: ~system/EngineApi
REQUIRE: ~system/EngineApi
OPCODES ~= 65k
MALLOC_COUNT = 12721
MALLOC_COUNT = 12723
ALIVE_OBJS_DELTA ~= 2.84k
CALL onStart()
Renderer: APPEND_VALUE e=0x200 c=1063 t=0 data={"button":0,"hit":{"position":{"x":1,"y":2,"z":3},"globalOrigin":{"x":1,"y":2,"z":3},"direction":{"x":1,"y":2,"z":3},"normalHit":{"x":1,"y":2,"z":3},"length":10,"meshName":"mesh","entityId":512},"state":1,"timestamp":1,"analog":5,"tickNumber":0}
Expand Down Expand Up @@ -55,4 +55,4 @@ CALL onUpdate(0.1)
OPCODES ~= 14k
MALLOC_COUNT = 31
ALIVE_OBJS_DELTA ~= 0.01k
MEMORY_USAGE_COUNT ~= 899.15k bytes
MEMORY_USAGE_COUNT ~= 899.73k bytes
6 changes: 3 additions & 3 deletions test/snapshots/production-bundles/billboard.ts.crdt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
SCENE_COMPILED_JS_SIZE_PROD=230.9k bytes
SCENE_COMPILED_JS_SIZE_PROD=231.2k bytes
(start empty vm 0.21.0-3680274614.commit-1808aa1)
OPCODES ~= 0k
MALLOC_COUNT = 1005
Expand All @@ -9,7 +9,7 @@ EVAL test/snapshots/production-bundles/billboard.js
REQUIRE: ~system/EngineApi
REQUIRE: ~system/EngineApi
OPCODES ~= 66k
MALLOC_COUNT = 14834
MALLOC_COUNT = 14836
ALIVE_OBJS_DELTA ~= 3.24k
CALL onStart()
OPCODES ~= 0k
Expand Down Expand Up @@ -77,4 +77,4 @@ CALL onUpdate(0.1)
OPCODES ~= 9k
MALLOC_COUNT = 0
ALIVE_OBJS_DELTA ~= 0.00k
MEMORY_USAGE_COUNT ~= 1041.51k bytes
MEMORY_USAGE_COUNT ~= 1042.09k bytes
6 changes: 3 additions & 3 deletions test/snapshots/production-bundles/cube-deleted.ts.crdt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
SCENE_COMPILED_JS_SIZE_PROD=194.1k bytes
SCENE_COMPILED_JS_SIZE_PROD=194.3k bytes
(start empty vm 0.21.0-3680274614.commit-1808aa1)
OPCODES ~= 0k
MALLOC_COUNT = 1005
Expand All @@ -9,7 +9,7 @@ EVAL test/snapshots/production-bundles/cube-deleted.js
REQUIRE: ~system/EngineApi
REQUIRE: ~system/EngineApi
OPCODES ~= 55k
MALLOC_COUNT = 11876
MALLOC_COUNT = 11878
ALIVE_OBJS_DELTA ~= 2.62k
CALL onStart()
OPCODES ~= 0k
Expand Down Expand Up @@ -42,4 +42,4 @@ CALL onUpdate(0.1)
OPCODES ~= 5k
MALLOC_COUNT = 1
ALIVE_OBJS_DELTA ~= 0.00k
MEMORY_USAGE_COUNT ~= 861.88k bytes
MEMORY_USAGE_COUNT ~= 862.46k bytes
6 changes: 3 additions & 3 deletions test/snapshots/production-bundles/cube.ts.crdt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
SCENE_COMPILED_JS_SIZE_PROD=193.9k bytes
SCENE_COMPILED_JS_SIZE_PROD=194.2k bytes
(start empty vm 0.21.0-3680274614.commit-1808aa1)
OPCODES ~= 0k
MALLOC_COUNT = 1005
Expand All @@ -9,7 +9,7 @@ EVAL test/snapshots/production-bundles/cube.js
REQUIRE: ~system/EngineApi
REQUIRE: ~system/EngineApi
OPCODES ~= 55k
MALLOC_COUNT = 11849
MALLOC_COUNT = 11851
ALIVE_OBJS_DELTA ~= 2.61k
CALL onStart()
OPCODES ~= 0k
Expand All @@ -32,4 +32,4 @@ CALL onUpdate(0.1)
OPCODES ~= 1k
MALLOC_COUNT = 0
ALIVE_OBJS_DELTA ~= 0.00k
MEMORY_USAGE_COUNT ~= 851.79k bytes
MEMORY_USAGE_COUNT ~= 852.37k bytes
6 changes: 3 additions & 3 deletions test/snapshots/production-bundles/cubes.ts.crdt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
SCENE_COMPILED_JS_SIZE_PROD=231.2k bytes
SCENE_COMPILED_JS_SIZE_PROD=231.5k bytes
(start empty vm 0.21.0-3680274614.commit-1808aa1)
OPCODES ~= 0k
MALLOC_COUNT = 1005
Expand All @@ -9,7 +9,7 @@ EVAL test/snapshots/production-bundles/cubes.js
REQUIRE: ~system/EngineApi
REQUIRE: ~system/EngineApi
OPCODES ~= 105k
MALLOC_COUNT = 18176
MALLOC_COUNT = 18178
ALIVE_OBJS_DELTA ~= 4.53k
CALL onStart()
OPCODES ~= 0k
Expand Down Expand Up @@ -1652,4 +1652,4 @@ CALL onUpdate(0.1)
OPCODES ~= 691k
MALLOC_COUNT = 0
ALIVE_OBJS_DELTA ~= 0.00k
MEMORY_USAGE_COUNT ~= 1177.44k bytes
MEMORY_USAGE_COUNT ~= 1178.02k bytes
6 changes: 3 additions & 3 deletions test/snapshots/production-bundles/pointer-events.ts.crdt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
SCENE_COMPILED_JS_SIZE_PROD=194.9k bytes
SCENE_COMPILED_JS_SIZE_PROD=195.2k bytes
(start empty vm 0.21.0-3680274614.commit-1808aa1)
OPCODES ~= 0k
MALLOC_COUNT = 1005
Expand All @@ -9,7 +9,7 @@ EVAL test/snapshots/production-bundles/pointer-events.js
REQUIRE: ~system/EngineApi
REQUIRE: ~system/EngineApi
OPCODES ~= 56k
MALLOC_COUNT = 12135
MALLOC_COUNT = 12137
ALIVE_OBJS_DELTA ~= 2.70k
CALL onStart()
OPCODES ~= 0k
Expand Down Expand Up @@ -43,4 +43,4 @@ CALL onUpdate(0.1)
OPCODES ~= 1k
MALLOC_COUNT = 0
ALIVE_OBJS_DELTA ~= 0.00k
MEMORY_USAGE_COUNT ~= 869.52k bytes
MEMORY_USAGE_COUNT ~= 870.10k bytes
6 changes: 3 additions & 3 deletions test/snapshots/production-bundles/schema-components.ts.crdt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
SCENE_COMPILED_JS_SIZE_PROD=194k bytes
SCENE_COMPILED_JS_SIZE_PROD=194.3k bytes
(start empty vm 0.21.0-3680274614.commit-1808aa1)
OPCODES ~= 0k
MALLOC_COUNT = 1005
Expand All @@ -9,7 +9,7 @@ EVAL test/snapshots/production-bundles/schema-components.js
REQUIRE: ~system/EngineApi
REQUIRE: ~system/EngineApi
OPCODES ~= 59k
MALLOC_COUNT = 11976
MALLOC_COUNT = 11978
ALIVE_OBJS_DELTA ~= 2.65k
CALL onStart()
OPCODES ~= 0k
Expand All @@ -31,4 +31,4 @@ CALL onUpdate(0.1)
OPCODES ~= 1k
MALLOC_COUNT = 0
ALIVE_OBJS_DELTA ~= 0.00k
MEMORY_USAGE_COUNT ~= 854.21k bytes
MEMORY_USAGE_COUNT ~= 854.79k bytes
6 changes: 3 additions & 3 deletions test/snapshots/production-bundles/ui.ts.crdt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
SCENE_COMPILED_JS_SIZE_PROD=351k bytes
SCENE_COMPILED_JS_SIZE_PROD=351.3k bytes
(start empty vm 0.21.0-3680274614.commit-1808aa1)
OPCODES ~= 0k
MALLOC_COUNT = 1005
Expand All @@ -9,7 +9,7 @@ EVAL test/snapshots/production-bundles/ui.js
REQUIRE: ~system/EngineApi
REQUIRE: ~system/EngineApi
OPCODES ~= 65k
MALLOC_COUNT = 19447
MALLOC_COUNT = 19449
ALIVE_OBJS_DELTA ~= 3.87k
CALL onStart()
OPCODES ~= 0k
Expand Down Expand Up @@ -65,4 +65,4 @@ CALL onUpdate(0.1)
OPCODES ~= 63k
MALLOC_COUNT = 0
ALIVE_OBJS_DELTA ~= 0.00k
MEMORY_USAGE_COUNT ~= 1686.56k bytes
MEMORY_USAGE_COUNT ~= 1687.14k bytes
6 changes: 3 additions & 3 deletions test/snapshots/production-bundles/with-main-function.ts.crdt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
SCENE_COMPILED_JS_SIZE_PROD=194.6k bytes
SCENE_COMPILED_JS_SIZE_PROD=194.9k bytes
(start empty vm 0.21.0-3680274614.commit-1808aa1)
OPCODES ~= 0k
MALLOC_COUNT = 1005
Expand All @@ -9,7 +9,7 @@ EVAL test/snapshots/production-bundles/with-main-function.js
REQUIRE: ~system/EngineApi
REQUIRE: ~system/EngineApi
OPCODES ~= 55k
MALLOC_COUNT = 12005
MALLOC_COUNT = 12007
ALIVE_OBJS_DELTA ~= 2.65k
CALL onStart()
OPCODES ~= 0k
Expand Down Expand Up @@ -37,4 +37,4 @@ CALL onUpdate(0.1)
OPCODES ~= 3k
MALLOC_COUNT = 5
ALIVE_OBJS_DELTA ~= 0.00k
MEMORY_USAGE_COUNT ~= 867.33k bytes
MEMORY_USAGE_COUNT ~= 867.92k bytes

0 comments on commit 2ce9016

Please sign in to comment.