Skip to content

wzshiming/romanumeral

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

romanumeral

Roman numerals in Go

Go Report Card GoDoc GitHub license gocover.io

Install

go get -u -v github.com/wzshiming/romanumeral

Example

func TestRoman(t *testing.T) {
	for i := Roman(1); i != 4000; i++ {
		tmp, err := i.EncodeToString()
		if err != nil {
			t.Error(err)
		}
		var d Roman
		off, err := d.DecodeString(tmp)
		if err != nil {
			t.Error(err)
		}
		if d != i {
			t.Fatal(int(i), d, i, off, tmp)
		}
	}
}

License

Pouch is licensed under the MIT License. See LICENSE for the full license text.

Releases

No releases published

Packages

No packages published

Languages