Sha256: 768032aac7b8fba907d46dcdf3aa4bf35fcd159fd893f1127df52579b56b06c4

Contents?: true

Size: 1.65 KB

Versions: 149

Compression:

Stored size: 1.65 KB

Contents

module AcronymTest

open NUnit.Framework
open Acronym

[<Test>]
let ``Empty string abbreviated to empty string`` () =
    Assert.That(acronym "", Is.EqualTo(""))

[<Test>]
[<Ignore("Remove to run test")>]
let ``Basic`` () =
    let phrase = "Portable Network Graphics"
    let expected = "PNG"
    let actual = acronym phrase
    Assert.That(expected, Is.EqualTo(actual))

[<Test>]
[<Ignore("Remove to run test")>]
let ``Lowercase words`` () =
    let phrase = "Ruby on Rails"
    let expected = "ROR"
    let actual = acronym phrase
    Assert.That(expected, Is.EqualTo(actual))

[<Test>]
[<Ignore("Remove to run test")>]
let ``Camel case`` () =
    let phrase = "HyperText Markup Language"
    let expected = "HTML"
    let actual = acronym phrase
    Assert.That(expected, Is.EqualTo(actual))

[<Test>]
[<Ignore("Remove to run test")>]
let ``Punctuation`` () =
    let phrase = "First In, First Out"
    let expected = "FIFO"
    let actual = acronym phrase
    Assert.That(expected, Is.EqualTo(actual))

[<Test>]
[<Ignore("Remove to run test")>]
let ``All-Caps words`` () =
    let phrase = "PHP: Hypertext Preprocessor"
    let expected = "PHP"
    let actual = acronym phrase
    Assert.That(expected, Is.EqualTo(actual))

[<Test>]
[<Ignore("Remove to run test")>]
let ``Non-acronym all-caps word`` () =
    let phrase = "GNU Image Manipulation Program"
    let expected = "GIMP"
    let actual = acronym phrase
    Assert.That(expected, Is.EqualTo(actual))

[<Test>]
[<Ignore("Remove to run test")>]
let ``Hyphenated`` () =
    let phrase = "Complementary metal-oxide semiconductor"
    let expected = "CMOS"
    let actual = acronym phrase
    Assert.That(expected, Is.EqualTo(actual))

Version data entries

149 entries across 149 versions & 1 rubygems

Version Path
trackler-2.1.0.4 tracks/fsharp/exercises/acronym/AcronymTest.fs
trackler-2.1.0.3 tracks/fsharp/exercises/acronym/AcronymTest.fs
trackler-2.1.0.2 tracks/fsharp/exercises/acronym/AcronymTest.fs
trackler-2.1.0.1 tracks/fsharp/exercises/acronym/AcronymTest.fs
trackler-2.1.0.0 tracks/fsharp/exercises/acronym/AcronymTest.fs
trackler-2.0.8.55 tracks/fsharp/exercises/acronym/AcronymTest.fs
trackler-2.0.8.54 tracks/fsharp/exercises/acronym/AcronymTest.fs
trackler-2.0.8.53 tracks/fsharp/exercises/acronym/AcronymTest.fs
trackler-2.0.8.52 tracks/fsharp/exercises/acronym/AcronymTest.fs
trackler-2.0.8.51 tracks/fsharp/exercises/acronym/AcronymTest.fs
trackler-2.0.8.50 tracks/fsharp/exercises/acronym/AcronymTest.fs
trackler-2.0.8.49 tracks/fsharp/exercises/acronym/AcronymTest.fs
trackler-2.0.8.48 tracks/fsharp/exercises/acronym/AcronymTest.fs
trackler-2.0.8.47 tracks/fsharp/exercises/acronym/AcronymTest.fs
trackler-2.0.8.46 tracks/fsharp/exercises/acronym/AcronymTest.fs
trackler-2.0.8.45 tracks/fsharp/exercises/acronym/AcronymTest.fs
trackler-2.0.8.44 tracks/fsharp/exercises/acronym/AcronymTest.fs
trackler-2.0.8.43 tracks/fsharp/exercises/acronym/AcronymTest.fs
trackler-2.0.8.42 tracks/fsharp/exercises/acronym/AcronymTest.fs
trackler-2.0.8.41 tracks/fsharp/exercises/acronym/AcronymTest.fs