mirror of
https://github.com/Ryujinx/Opentk.git
synced 2025-01-09 09:15:31 +00:00
More tests.
This commit is contained in:
parent
d352853f47
commit
e33c3395af
|
@ -4,6 +4,7 @@ open Xunit
|
||||||
open FsCheck
|
open FsCheck
|
||||||
open FsCheck.Xunit
|
open FsCheck.Xunit
|
||||||
open System
|
open System
|
||||||
|
open System.Runtime.InteropServices
|
||||||
open OpenTK
|
open OpenTK
|
||||||
|
|
||||||
module Vector3 =
|
module Vector3 =
|
||||||
|
@ -678,4 +679,14 @@ module Vector3 =
|
||||||
let ``Unit one is correct`` =
|
let ``Unit one is correct`` =
|
||||||
let unitOne = Vector3((float32)1, (float32)1, (float32)1)
|
let unitOne = Vector3((float32)1, (float32)1, (float32)1)
|
||||||
|
|
||||||
Assert.Equal(Vector3.One, unitOne)
|
Assert.Equal(Vector3.One, unitOne)
|
||||||
|
|
||||||
|
[<Properties(Arbitrary = [| typeof<OpenTKGen> |])>]
|
||||||
|
module Serialization =
|
||||||
|
//
|
||||||
|
[<Property>]
|
||||||
|
let ``The absolute size of a Vector3 is always the size of its components`` (v : Vector3) =
|
||||||
|
let expectedSize = sizeof<float32> * 3
|
||||||
|
|
||||||
|
Assert.Equal(expectedSize, Vector3.SizeInBytes)
|
||||||
|
Assert.Equal(expectedSize, Marshal.SizeOf(Vector3()))
|
Loading…
Reference in a new issue