From 03f916abbb430807e90627bad6d61a24c27c99e2 Mon Sep 17 00:00:00 2001 From: Jarl Gullberg Date: Wed, 31 May 2017 21:40:44 +0200 Subject: [PATCH] Added Vector4 constructor test. --- tests/OpenTK.Tests/Vector3Tests.fs | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/tests/OpenTK.Tests/Vector3Tests.fs b/tests/OpenTK.Tests/Vector3Tests.fs index 4828f869..483c7596 100644 --- 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) + [] + 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) + [ |])>] module Indexing = //