From e33c3395afabab4fe810abe4cb18ea92afcc39e4 Mon Sep 17 00:00:00 2001 From: Jarl Gullberg Date: Thu, 1 Jun 2017 16:05:02 +0200 Subject: [PATCH] More tests. --- tests/OpenTK.Tests/Vector3Tests.fs | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/tests/OpenTK.Tests/Vector3Tests.fs b/tests/OpenTK.Tests/Vector3Tests.fs index b4ace2f..8ac1b4a 100644 --- a/tests/OpenTK.Tests/Vector3Tests.fs +++ b/tests/OpenTK.Tests/Vector3Tests.fs @@ -4,6 +4,7 @@ open Xunit open FsCheck open FsCheck.Xunit open System +open System.Runtime.InteropServices open OpenTK module Vector3 = @@ -678,4 +679,14 @@ module Vector3 = let ``Unit one is correct`` = let unitOne = Vector3((float32)1, (float32)1, (float32)1) - Assert.Equal(Vector3.One, unitOne) \ No newline at end of file + Assert.Equal(Vector3.One, unitOne) + + [ |])>] + module Serialization = + // + [] + let ``The absolute size of a Vector3 is always the size of its components`` (v : Vector3) = + let expectedSize = sizeof * 3 + + Assert.Equal(expectedSize, Vector3.SizeInBytes) + Assert.Equal(expectedSize, Marshal.SizeOf(Vector3())) \ No newline at end of file -- 2.7.4