PageRenderTime 38ms CodeModel.GetById 16ms RepoModel.GetById 0ms app.codeStats 0ms

/vendor/gems/facets-2.4.5/test/core/string/test_xor.rb

https://bitbucket.org/mediashelf/fedora-migrator
Ruby | 13 lines | 9 code | 4 blank | 0 comment | 0 complexity | 7bd34f17aa9a56fa361a3009283bf081 MD5 | raw file
Possible License(s): GPL-3.0, GPL-2.0, IPL-1.0, AGPL-1.0, LGPL-3.0
  1. require 'facets/string/xor.rb'
  2. require 'test/unit'
  3. class StringXorTest < Test::Unit::TestCase
  4. def test_xor
  5. r = "try this out" ^ "puddingsnacks"
  6. x = "\004\a\035D\035\006\016\000N\016\026\037"
  7. assert_equal(x,r)
  8. end
  9. end