Fix tests.

This commit is contained in:
kovacsv 2021-07-11 11:29:52 +02:00
parent d32dc8485a
commit 46ef2c7a93
2 changed files with 7 additions and 8 deletions

View File

@ -110,7 +110,7 @@ describe ('Model Finalization', function() {
var model = new OV.Model ();
var meshIndex = model.AddMesh (mesh);
assert.strictEqual (model.MaterialCount (), 0);
OV.FinalizeModel (model, function () { new OV.Material () });
OV.FinalizeModel (model, function () { return new OV.Material () });
assert.strictEqual (model.MaterialCount (), 1);
var theMesh = model.GetMesh (meshIndex);
assert.strictEqual (theMesh.NormalCount (), 1);
@ -139,7 +139,7 @@ describe ('Model Finalization', function() {
var model = new OV.Model ()
var meshIndex = model.AddMesh (mesh);
OV.FinalizeModel (model, function () { new OV.Material () });
OV.FinalizeModel (model, function () { return new OV.Material () });
var theMesh = model.GetMesh (meshIndex);
assert.strictEqual (theMesh.NormalCount (), 6);
@ -172,7 +172,7 @@ describe ('Model Finalization', function() {
var model = new OV.Model ()
var meshIndex = model.AddMesh (mesh);
OV.FinalizeModel (model, function () { new OV.Material () });
OV.FinalizeModel (model, function () { return new OV.Material () });
var theMesh = model.GetMesh (meshIndex);
assert.strictEqual (theMesh.NormalCount (), 9);

View File

@ -148,7 +148,7 @@ module.exports =
let cube2 = OV.GenerateCuboid (new OV.GeneratorParams ().SetTransformationMatrix (matrix), 1.0, 1.0, 1.0);
model.AddMesh (cube2);
OV.FinalizeModel (model, function () { new OV.Material () });
OV.FinalizeModel (model, function () { return new OV.Material () });
return model;
},
@ -163,11 +163,10 @@ module.exports =
let cube2 = OV.GenerateCuboid (new OV.GeneratorParams ().SetTransformationMatrix (matrix), 1.0, 1.0, 1.0);
model.AddMesh (cube2);
OV.FinalizeModel (model, function () { new OV.Material () });
OV.FinalizeModel (model, function () { return new OV.Material () });
return model;
},
GetTwoCubesConnectingInOneFaceModel ()
{
let model = new OV.Model ();
@ -179,7 +178,7 @@ module.exports =
let cube2 = OV.GenerateCuboid (new OV.GeneratorParams ().SetTransformationMatrix (matrix), 1.0, 1.0, 1.0);
model.AddMesh (cube2);
OV.FinalizeModel (model, function () { new OV.Material () });
OV.FinalizeModel (model, function () { return new OV.Material () });
return model;
},
@ -228,7 +227,7 @@ module.exports =
{
var model = new OV.Model ();
model.AddMesh (mesh);
OV.FinalizeModel (model, function () { new OV.Material () });
OV.FinalizeModel (model, function () { return new OV.Material () });
return model;
}
}