I have the following unit test:
open System
open System.Collections.Generic
open Microsoft.VisualStudio.TestTools.UnitTesting
[<TestClass>]
type Test_Spectra () =
let standard = new Standard1()
[<TestMethod>]
member x.LightTransmittance () =
let input = Test_Spectra.TestSprectra1
let expected = 0.32728222797751
let actual = standard.LightTransmittance(input)
Assert.AreEqual(expected, actual)
When I run the unit test it fails, however the values for 'expected' and 'actual' are equal:
Expected and Actual are inferred as a float and double respectively, but I was under the impression that float is simply shorthand for double. Is there any explanation for this?
EDIT As per @Gustavo's comment, I have changed the final line to:
Assert.AreEqual(expected, actual, 0.000000000000001)
and the test passes.