Sha256: 9879ba59653fd69f1740378fb83b2f8a96d29b60917e6d8d83061ec7e7dcade8
Contents?: true
Size: 944 Bytes
Versions: 140
Compression:
Stored size: 944 Bytes
Contents
source("./rna-transcription.R") library(testthat) test_that("RNA complement of cytosine is guanine", { dna <- "C" expect_equal(to_rna(dna), "G") }) test_that("RNA complement of guanine is cytosine", { dna <- "G" expect_equal(to_rna(dna), "C") }) test_that("RNA complement of thymine is adenine", { dna <- "T" expect_equal(to_rna(dna), "A") }) test_that("RNA complement of adenine is uracil", { dna <- "A" expect_equal(to_rna(dna), "U") }) test_that("RNA complement", { dna <- "ACGTGGTCTTAA" expect_equal(to_rna(dna), "UGCACCAGAAUU") }) test_that("DNA correctly handles invalid input", { dna <- "U" expect_error(to_rna(dna)) }) test_that("DNA correctly handles completely invalid input", { dna <- "XXX" expect_error(to_rna(dna)) }) test_that("DNA correctly handles partially invalid input", { dna <- "ACGTXXXCTTAA" expect_error(to_rna(dna)) }) message("All tests passed for exercise: rna-transcription")
Version data entries
140 entries across 140 versions & 1 rubygems