From bc457f00b3763b77e8f6c78b169b92a4a3f673e8 Mon Sep 17 00:00:00 2001 From: Simon Shine Date: Fri, 1 Feb 2019 09:15:01 +0100 Subject: [PATCH] Hamming: Bump test suite to 2.2.0 This references exercism/problem-specifications#1412. --- exercises/hamming/package.yaml | 2 +- exercises/hamming/test/Tests.hs | 58 +++++---------------------------- 2 files changed, 10 insertions(+), 50 deletions(-) diff --git a/exercises/hamming/package.yaml b/exercises/hamming/package.yaml index c2e6b399f..171179b05 100644 --- a/exercises/hamming/package.yaml +++ b/exercises/hamming/package.yaml @@ -1,5 +1,5 @@ name: hamming -version: 2.1.1.8 +version: 2.2.0.9 dependencies: - base diff --git a/exercises/hamming/test/Tests.hs b/exercises/hamming/test/Tests.hs index 301b02f4b..61367baa4 100644 --- a/exercises/hamming/test/Tests.hs +++ b/exercises/hamming/test/Tests.hs @@ -31,62 +31,22 @@ cases = [ Case { description = "empty strands" , strand2 = "" , expected = Just 0 } - , Case { description = "identical strands" + , Case { description = "single letter identical strands" , strand1 = "A" , strand2 = "A" , expected = Just 0 } - , Case { description = "long identical strands" - , strand1 = "GGACTGA" - , strand2 = "GGACTGA" - , expected = Just 0 - } - , Case { description = "complete distance in single nucleotide strands" - , strand1 = "A" - , strand2 = "G" - , expected = Just 1 - } - , Case { description = "complete distance in small strands" - , strand1 = "AG" - , strand2 = "CT" - , expected = Just 2 - } - , Case { description = "small distance in small strands" - , strand1 = "AT" - , strand2 = "CT" - , expected = Just 1 - } - , Case { description = "small distance" - , strand1 = "GGACG" - , strand2 = "GGTCG" + , Case { description = "single letter different strands" + , strand1 = "G" + , strand2 = "T" , expected = Just 1 } - , Case { description = "small distance in long strands" - , strand1 = "ACCAGGG" - , strand2 = "ACTATGG" - , expected = Just 2 - } - , Case { description = "non-unique character in first strand" - , strand1 = "AAG" - , strand2 = "AAA" - , expected = Just 1 - } - , Case { description = "non-unique character in second strand" - , strand1 = "AAA" - , strand2 = "AAG" - , expected = Just 1 - } - , Case { description = "same nucleotides in different positions" - , strand1 = "TAG" - , strand2 = "GAT" - , expected = Just 2 - } - , Case { description = "large distance" - , strand1 = "GATACA" - , strand2 = "GCATAA" - , expected = Just 4 + , Case { description = "long identical strands" + , strand1 = "GGACTGAAATCTG" + , strand2 = "GGACTGAAATCTG" + , expected = Just 0 } - , Case { description = "large distance in off-by-one strand" + , Case { description = "long different strands" , strand1 = "GGACGGATTCTG" , strand2 = "AGGACGGATTCT" , expected = Just 9