Add another test.

This commit is contained in:
kovacsv 2023-10-17 19:58:32 +02:00
parent a3f9138579
commit 0b925de473
2 changed files with 55 additions and 0 deletions

View File

@ -0,0 +1,16 @@
v 0.0 0.0 0.0
v 1.0 0.0 0.0
v 1.0 1.0 0.0
v 0.0 1.0 0.0
g Mesh01
l 1 2
l 3 4
v 0.0 0.0 1.0
v 1.0 0.0 1.0
v 1.0 1.0 1.0
v 0.0 1.0 1.0
g Mesh02
l 5 6 6 7 7 8 8 5

View File

@ -719,6 +719,45 @@ describe ('Obj Importer', function () {
}); });
}); });
it ('lines_in_meshes_2.obj', function (done) {
ImportObjFile ('lines_in_meshes_2.obj', function (model) {
assert.ok (OV.CheckModel (model));
assert.deepStrictEqual (ModelToObject (model), {
name : '',
materials : [
{ name : '' }
],
meshes : [
{
name : 'Mesh01',
lines : [
{
vertices : [0, 0, 0, 1, 0, 0],
mat : 0
},
{
vertices : [1, 1, 0, 0, 1, 0],
mat : 0
}
],
triangles : []
},
{
name : 'Mesh02',
lines : [
{
vertices : [0, 0, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 0, 0, 1],
mat : 0
}
],
triangles : []
}
]
});
done ();
});
});
it ('lines_colors.obj', function (done) { it ('lines_colors.obj', function (done) {
ImportObjFile ('lines_colors.obj', function (model) { ImportObjFile ('lines_colors.obj', function (model) {
assert.ok (OV.CheckModel (model)); assert.ok (OV.CheckModel (model));