Sha256: be67fda4752f12820a6b90bdde676be382b6d4e99c9a30b25e02a695dbb0ebd3

Contents?: true

Size: 1.52 KB

Versions: 141

Compression:

Stored size: 1.52 KB

Contents

module Test.Main where

import Prelude
import Control.Monad.Eff (Eff)
import Control.Monad.Eff.AVar (AVAR)
import Control.Monad.Eff.Console (CONSOLE)
import Test.Unit.Assert as Assert
import Test.Unit (TestSuite, suite, test)
import Test.Unit.Console (TESTOUTPUT)
import Test.Unit.Main (runTest)
import Isogram (isIsogram)

main :: forall eff
  . Eff ( avar :: AVAR
        , console :: CONSOLE
        , testOutput :: TESTOUTPUT
        | eff                     
        )
        Unit
main = runTest suites

suites :: forall e. TestSuite e
suites = do
  suite "Isogram.transform" do

    test "empty string" $
      Assert.equal true
                   (isIsogram "")

    test "isogram with only lower case characters" $
      Assert.equal true
                   (isIsogram "isogram")

    test "word with one duplicated character" $
      Assert.equal false
                   (isIsogram "eleven")

    test "longest reported english isogram" $
      Assert.equal true
                   (isIsogram "subdermatoglyphic")

    test "word with duplicated character in mixed case" $
      Assert.equal false
                   (isIsogram "Alphabet")

    test "hypothetical isogrammic word with hyphen" $
      Assert.equal true
                   (isIsogram "thumbscrew-japingly")

    test "isogram with duplicated non letter character" $
      Assert.equal true
                   (isIsogram "Hjelmqvist-Gryb-Zock-Pfund-Wax")

    test "made-up name that is an isogram" $
      Assert.equal true
                   (isIsogram "Emily Jung Schwartzkopf")

Version data entries

141 entries across 141 versions & 1 rubygems

Version Path
trackler-2.2.1.180 tracks/purescript/exercises/isogram/test/Main.purs
trackler-2.2.1.179 tracks/purescript/exercises/isogram/test/Main.purs
trackler-2.2.1.178 tracks/purescript/exercises/isogram/test/Main.purs
trackler-2.2.1.177 tracks/purescript/exercises/isogram/test/Main.purs
trackler-2.2.1.176 tracks/purescript/exercises/isogram/test/Main.purs
trackler-2.2.1.175 tracks/purescript/exercises/isogram/test/Main.purs
trackler-2.2.1.174 tracks/purescript/exercises/isogram/test/Main.purs
trackler-2.2.1.173 tracks/purescript/exercises/isogram/test/Main.purs
trackler-2.2.1.172 tracks/purescript/exercises/isogram/test/Main.purs
trackler-2.2.1.171 tracks/purescript/exercises/isogram/test/Main.purs
trackler-2.2.1.170 tracks/purescript/exercises/isogram/test/Main.purs
trackler-2.2.1.169 tracks/purescript/exercises/isogram/test/Main.purs
trackler-2.2.1.167 tracks/purescript/exercises/isogram/test/Main.purs
trackler-2.2.1.166 tracks/purescript/exercises/isogram/test/Main.purs
trackler-2.2.1.165 tracks/purescript/exercises/isogram/test/Main.purs
trackler-2.2.1.164 tracks/purescript/exercises/isogram/test/Main.purs
trackler-2.2.1.163 tracks/purescript/exercises/isogram/test/Main.purs
trackler-2.2.1.162 tracks/purescript/exercises/isogram/test/Main.purs
trackler-2.2.1.161 tracks/purescript/exercises/isogram/test/Main.purs
trackler-2.2.1.160 tracks/purescript/exercises/isogram/test/Main.purs