Skip to content

Instantly share code, notes, and snippets.

@JohanLarsson
Last active August 29, 2015 14:08
Show Gist options
  • Save JohanLarsson/35c230da48edd89f8a40 to your computer and use it in GitHub Desktop.
Save JohanLarsson/35c230da48edd89f8a40 to your computer and use it in GitHub Desktop.
namespace Gu.Units.Fsharp.Tests
open NUnit.Framework;
open Gu.Units;
[<Measure>] type sec
[<Measure>] type kg
[<Measure>] type m
[<Measure>] type cm
[<Measure>] type inch
module Tests=
[<Test>]
let ``Centimetres to metres``() =
let cmValue = Length.FromCentimetres(1.2);
Assert.AreEqual(1.2<cm>, cmValue.Metres) // How do I convert <cm> to <m> here?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment