From f43656022928caaf5a9882d93ffdf64eb069fbab Mon Sep 17 00:00:00 2001 From: Dimitri Sokolyuk Date: Sun, 28 Aug 2016 02:29:13 +0200 Subject: Solve RNA --- go/rna-transcription/rna_transcription_test.go | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 go/rna-transcription/rna_transcription_test.go (limited to 'go/rna-transcription/rna_transcription_test.go') diff --git a/go/rna-transcription/rna_transcription_test.go b/go/rna-transcription/rna_transcription_test.go new file mode 100644 index 0000000..4d4ca8f --- /dev/null +++ b/go/rna-transcription/rna_transcription_test.go @@ -0,0 +1,25 @@ +package strand + +import "testing" + +const targetTestVersion = 3 + +func TestRNATranscription(t *testing.T) { + if testVersion != targetTestVersion { + t.Fatalf("Found testVersion = %v, want %v", testVersion, targetTestVersion) + } + for _, test := range rnaTests { + if actual := ToRNA(test.input); actual != test.expected { + t.Errorf("ToRNA(%s): %s, expected %s", + test.input, actual, test.expected) + } + } +} + +func BenchmarkRNATranscription(b *testing.B) { + for i := 0; i < b.N; i++ { + for _, test := range rnaTests { + ToRNA(test.input) + } + } +} -- cgit v1.2.3