Sha256: a3b7858af2c14bf9cbcd398b4db83796fe120b446480922af2a6d0d9b11a56b5

Contents?: true

Size: 644 Bytes

Versions: 222

Compression:

Stored size: 644 Bytes

Contents

Execute ("empty strands"):
  AssertEqual 0, Hamming('', '')

Execute (identical strands):
  AssertEqual 0, Hamming('AGT', 'AGT')

Execute (one difference):
  AssertEqual 1, Hamming('AGT', 'AGG')

Execute (reversed strand):
  AssertEqual 2, Hamming('AGT', 'TGA')

Execute (strands are off by one):
  AssertEqual 9, Hamming('GGACGGATTCTG', 'AGGACGGATTCT')

Execute (strands of different length throw exception):
  AssertThrows call Hamming('A', 'AA')
  AssertEqual 'The two strands must have the same length.', g:vader_exception
  AssertThrows call Hamming('AA', 'A')
  AssertEqual 'The two strands must have the same length.', g:vader_exception

Version data entries

222 entries across 222 versions & 1 rubygems

Version Path
trackler-2.2.1.180 tracks/vimscript/exercises/hamming/hamming.vader
trackler-2.2.1.179 tracks/vimscript/exercises/hamming/hamming.vader
trackler-2.2.1.178 tracks/vimscript/exercises/hamming/hamming.vader
trackler-2.2.1.177 tracks/vimscript/exercises/hamming/hamming.vader
trackler-2.2.1.176 tracks/vimscript/exercises/hamming/hamming.vader
trackler-2.2.1.175 tracks/vimscript/exercises/hamming/hamming.vader
trackler-2.2.1.174 tracks/vimscript/exercises/hamming/hamming.vader
trackler-2.2.1.173 tracks/vimscript/exercises/hamming/hamming.vader
trackler-2.2.1.172 tracks/vimscript/exercises/hamming/hamming.vader
trackler-2.2.1.171 tracks/vimscript/exercises/hamming/hamming.vader
trackler-2.2.1.170 tracks/vimscript/exercises/hamming/hamming.vader
trackler-2.2.1.169 tracks/vimscript/exercises/hamming/hamming.vader
trackler-2.2.1.167 tracks/vimscript/exercises/hamming/hamming.vader
trackler-2.2.1.166 tracks/vimscript/exercises/hamming/hamming.vader
trackler-2.2.1.165 tracks/vimscript/exercises/hamming/hamming.vader
trackler-2.2.1.164 tracks/vimscript/exercises/hamming/hamming.vader
trackler-2.2.1.163 tracks/vimscript/exercises/hamming/hamming.vader
trackler-2.2.1.162 tracks/vimscript/exercises/hamming/hamming.vader
trackler-2.2.1.161 tracks/vimscript/exercises/hamming/hamming.vader
trackler-2.2.1.160 tracks/vimscript/exercises/hamming/hamming.vader