projects
/
platform
/
core
/
csapi
/
opentk.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e4ec841
)
Added Vector4 constructor test.
author
Jarl Gullberg
<jarl.gullberg@gmail.com>
Wed, 31 May 2017 19:40:44 +0000
(21:40 +0200)
committer
Jarl Gullberg
<jarl.gullberg@gmail.com>
Wed, 31 May 2017 19:40:44 +0000
(21:40 +0200)
tests/OpenTK.Tests/Vector3Tests.fs
patch
|
blob
|
history
diff --git
a/tests/OpenTK.Tests/Vector3Tests.fs
b/tests/OpenTK.Tests/Vector3Tests.fs
index
4828f86
..
483c759
100644
(file)
--- a/
tests/OpenTK.Tests/Vector3Tests.fs
+++ b/
tests/OpenTK.Tests/Vector3Tests.fs
@@
-51,6
+51,19
@@
module Vector3 =
Assert.Equal(b, v2.Y)
Assert.Equal(c, v2.Z)
+ [<Property>]
+ let ``Vector4 value constructor sets all components to the correct values`` (a, b, c, d) =
+ let v1 = Vector4(a, b, c, d)
+ let v2 = Vector3(v1)
+
+ Assert.Equal(v1.X, v2.X)
+ Assert.Equal(v1.Y, v2.Y)
+ Assert.Equal(v1.Z, v2.Z)
+
+ Assert.Equal(a, v2.X)
+ Assert.Equal(b, v2.Y)
+ Assert.Equal(c, v2.Z)
+
[<Properties(Arbitrary = [| typeof<OpenTKGen> |])>]
module Indexing =
//