Sha256: f0f6582a03cc227c669fdbd3f264dc9c88f7909ae289d67cd83ed1a75322e69c
Contents?: true
Size: 606 Bytes
Versions: 1
Compression:
Stored size: 606 Bytes
Contents
require 'dirge' require ~'spec_helper' describe Anybase, "from" do it "should tell you the size for an arbitrary number of digits" do Anybase.new("012345678").size(10).should == 3486784401 (Anybase.new("012345678").size(10) * Anybase.new("012345678").size(10)).should == Anybase.new("012345678").size(20) end it "should normalize a number" do Anybase.new("01", :synonyms => {'0' => 'o', '1' => 'l'}, :ignore_case => true).normalize("l10oO1o").should == '1100010' end it "raise if the sign is in the chars" do proc{ Anybase.new("01", :sign => '0') }.should raise_error end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
anybase-0.0.11 | spec/util_spec.rb |