Sha256: d7a42e86e209f93d3ddc493ff76dc4b34f2d6aca15bbd65e46b972bc910b5ac0

Contents?: true

Size: 1.03 KB

Versions: 26

Compression:

Stored size: 1.03 KB

Contents

source("./isogram.R")
library(testthat)

test_that("empty string", {
  word <- ""
  expect_equal(is_isogram(word), TRUE)
})

test_that("isogram with only lower case characters", {
  word <- "isogram"
  expect_equal(is_isogram(word), TRUE)
})

test_that("word with one duplicated character", {
  word <- "eleven"
  expect_equal(is_isogram(word), FALSE)
})

test_that("longest reported english isogram", {
  word <- "subdermatoglyphic"
  expect_equal(is_isogram(word), TRUE)
})

test_that("word with duplicated character in mixed case", {
  word <- "Alphabet"
  expect_equal(is_isogram(word), FALSE)
})

test_that("hypothetical isogrammic word with hyphen", {
  word <- "thumbscrew-japingly"
  expect_equal(is_isogram(word), TRUE)
})

test_that("isogram with duplicated non letter character", {
  word <- "Hjelmqvist-Gryb-Zock-Pfund-Wax"
  expect_equal(is_isogram(word), TRUE)
})

test_that("made-up name that is an isogram", {
  word <- "Emily Jung Schwartzkopf"
  expect_equal(is_isogram(word), TRUE)
})

print("All tests passed for exercise: isogram")

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
trackler-2.1.0.48 tracks/r/exercises/isogram/test_isogram.R
trackler-2.1.0.47 tracks/r/exercises/isogram/test_isogram.R
trackler-2.1.0.46 tracks/r/exercises/isogram/test_isogram.R
trackler-2.1.0.45 tracks/r/exercises/isogram/test_isogram.R
trackler-2.1.0.44 tracks/r/exercises/isogram/test_isogram.R
trackler-2.1.0.43 tracks/r/exercises/isogram/test_isogram.R
trackler-2.1.0.42 tracks/r/exercises/isogram/test_isogram.R
trackler-2.1.0.41 tracks/r/exercises/isogram/test_isogram.R
trackler-2.1.0.40 tracks/r/exercises/isogram/test_isogram.R
trackler-2.1.0.39 tracks/r/exercises/isogram/test_isogram.R
trackler-2.1.0.38 tracks/r/exercises/isogram/test_isogram.R
trackler-2.1.0.37 tracks/r/exercises/isogram/test_isogram.R
trackler-2.1.0.36 tracks/r/exercises/isogram/test_isogram.R
trackler-2.1.0.34 tracks/r/exercises/isogram/test_isogram.R
trackler-2.1.0.33 tracks/r/exercises/isogram/test_isogram.R
trackler-2.1.0.32 tracks/r/exercises/isogram/test_isogram.R
trackler-2.1.0.31 tracks/r/exercises/isogram/test_isogram.R
trackler-2.1.0.30 tracks/r/exercises/isogram/test_isogram.R
trackler-2.1.0.29 tracks/r/exercises/isogram/test_isogram.R
trackler-2.1.0.28 tracks/r/exercises/isogram/test_isogram.R