/vendor/gems/facets-2.4.5/test/core/string/test_xor.rb
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
- require 'facets/string/xor.rb'
- require 'test/unit'
- class StringXorTest < Test::Unit::TestCase
- def test_xor
- r = "try this out" ^ "puddingsnacks"
- x = "\004\a\035D\035\006\016\000N\016\026\037"
- assert_equal(x,r)
- end
- end