Sha256: 7dc2ec76caa9ff7de9c1ec9b0e75b0db7bcbc271fc1b9685ec97fc931830ce1a
Contents?: true
Size: 1019 Bytes
Versions: 58
Compression:
Stored size: 1019 Bytes
Contents
import ceylon.test { ... } // Tests adapted from problem-specifications version 1.0.1 {[String, String|Null]*} cases => { // empty strand ["", ""], // single C nucleotide strand ["C", "G"], // single G nucleotide strand ["G", "C"], // single A nucleotide strand ["A", "U"], // single T nucleotide strand ["T", "A"], // longer strand ["ACGTGGTCTTAA", "UGCACCAGAAUU"], // strand with DNA nucleotides ["U", null], // strand with invalid nucleotides ["XCGFGGTDTTAA", null], // strand with invalid nucleotides after the first nucleotide ["ACGTFGTBTEAA", null] }; test parameters(`value cases`) void testHamming(String dna, String|Null expected) { if (exists expected) { assertEquals(transcription(dna), expected); } else if (!is Error result = transcription(dna)) { fail("should have errored, but got ``result``"); } }
Version data entries
58 entries across 58 versions & 1 rubygems