This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| func TestToRoma(t *testing.T) { | |
| if got, want := ToRoman(1), "I"; got != want { | |
| t.Errorf("Fail ToRoman(1): got %s want I", got) | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- FAIL: TestToRoma (0.00s) | |
| /Users/eiji/go/src/sandbox/roman/roman_test.go:13: Fail ToRoman(1): got _ want I | |
| FAIL | |
| FAIL sandbox/roman 0.006s | |
| Error: Tests failed. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package roman | |
| func ToRoman(in int16) string { | |
| return "I" | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package roman | |
| import ( | |
| "testing" | |
| ) | |
| func TestToRoman(t *testing.T) { | |
| if got, want := ToRoman(1), "I"; got != want { | |
| t.Errorf("Fail ToRoman(1): got %s want I", got) | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package roman | |
| import ( | |
| "testing" | |
| ) | |
| func TestToRoman(t *testing.T) { | |
| if got, want := Arabian(1).ToRoman(), "I"; got != want { | |
| t.Errorf("Fail Arabian(1).ToRoman(): got %s want I", got) | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package roman | |
| type Arabian uint16 | |
| func (in Arabian) ToRoman() string { | |
| return "I" | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package roman | |
| import ( | |
| "testing" | |
| ) | |
| func TestArabianToRoman(t *testing.T) { | |
| if got, want := Arabian(1).ToRoman(), Roman("I"); got != want { | |
| t.Errorf("Arabian(1).ToRoman(): got %v want %v", got, want) | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package roman | |
| type Arabian uint16 | |
| type Roman string | |
| func (in Arabian) ToRoman() Roman { | |
| return Roman("_TODO_") | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- FAIL: TestArabianToRoman (0.00s) | |
| /Users/eiji/go/src/sandbox/roman/roman_test.go:26: Arabian(1).ToRoman(): got _TODO_ want I | |
| FAIL | |
| FAIL sandbox/roman 0.006s | |
| Error: Tests failed. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package roman | |
| type Arabian uint16 | |
| type Roman string | |
| func (in Arabian) ToRoman() Roman { | |
| return Roman("I") | |
| } |