Added additional check against nonmatrix objects.

This commit is contained in:
Jarl Gullberg 2017-05-31 20:21:16 +02:00
parent 108906dfe4
commit b83174af94
No known key found for this signature in database
GPG key ID: 750FF6F6BDA72D23
2 changed files with 7 additions and 3 deletions

View file

@ -92,13 +92,17 @@ module Matrix4 =
module Equality =
//
[<Property>]
let ``Sixteen value constructor sets all components to the correct values`` (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p) =
let ``Two matrices with identical values are equal`` (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p) =
let A = Matrix4(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p)
let B = Matrix4(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p)
let equality = A = B
Assert.True(equality)
[<Property>]
let ``A matrix is not equal to an object which is not a matrix`` (a : Matrix4, b : Vector3) =
Assert.False(a.Equals(b))
[<Properties(Arbitrary = [| typeof<OpenTKGen> |])>]
module Multiplication =
//