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.139 tracks/vimscript/exercises/hamming/hamming.vader
trackler-2.2.1.138 tracks/vimscript/exercises/hamming/hamming.vader
trackler-2.2.1.137 tracks/vimscript/exercises/hamming/hamming.vader
trackler-2.2.1.136 tracks/vimscript/exercises/hamming/hamming.vader
trackler-2.2.1.135 tracks/vimscript/exercises/hamming/hamming.vader
trackler-2.2.1.134 tracks/vimscript/exercises/hamming/hamming.vader
trackler-2.2.1.133 tracks/vimscript/exercises/hamming/hamming.vader
trackler-2.2.1.132 tracks/vimscript/exercises/hamming/hamming.vader
trackler-2.2.1.131 tracks/vimscript/exercises/hamming/hamming.vader
trackler-2.2.1.130 tracks/vimscript/exercises/hamming/hamming.vader
trackler-2.2.1.129 tracks/vimscript/exercises/hamming/hamming.vader
trackler-2.2.1.128 tracks/vimscript/exercises/hamming/hamming.vader
trackler-2.2.1.127 tracks/vimscript/exercises/hamming/hamming.vader
trackler-2.2.1.126 tracks/vimscript/exercises/hamming/hamming.vader
trackler-2.2.1.125 tracks/vimscript/exercises/hamming/hamming.vader
trackler-2.2.1.124 tracks/vimscript/exercises/hamming/hamming.vader
trackler-2.2.1.123 tracks/vimscript/exercises/hamming/hamming.vader
trackler-2.2.1.122 tracks/vimscript/exercises/hamming/hamming.vader
trackler-2.2.1.121 tracks/vimscript/exercises/hamming/hamming.vader
trackler-2.2.1.120 tracks/vimscript/exercises/hamming/hamming.vader