| 1 | package qrterminal |
| 2 | |
| 3 | import ( |
| 4 | "os" |
| 5 | "testing" |
| 6 | ) |
| 7 | |
| 8 | func TestGenerate(t *testing.T) { |
| 9 | Generate("https://github.com/mdp/qrterminal", L, os.Stdout) |
| 10 | } |
| 11 | |
| 12 | func TestGenerateWithConfig(t *testing.T) { |
| 13 | config := Config{ |
| 14 | Level: M, |
| 15 | Writer: os.Stdout, |
| 16 | BlackChar: WHITE, // Inverted |
| 17 | WhiteChar: BLACK, |
| 18 | QuietZone: QUIET_ZONE, |
| 19 | } |
| 20 | GenerateWithConfig("https://github.com/mdp/qrterminal", config) |
| 21 | } |
| 22 | |
| 23 | func TestGenerateHalfBlock(t *testing.T) { |
| 24 | GenerateHalfBlock("https://github.com/mdp/qrterminal", L, os.Stdout) |
| 25 | } |
| 26 | |
| 27 | func TestGenerateWithHalfBlockConfig(t *testing.T) { |
| 28 | config := Config{ |
| 29 | Level: M, |
| 30 | Writer: os.Stdout, |
| 31 | HalfBlocks: true, |
| 32 | BlackChar: BLACK_BLACK, |
| 33 | WhiteBlackChar: WHITE_BLACK, |
| 34 | WhiteChar: WHITE_WHITE, |
| 35 | BlackWhiteChar: BLACK_WHITE, |
| 36 | QuietZone: 3, |
| 37 | } |
| 38 | GenerateWithConfig("https://github.com/mdp/qrterminal", config) |
| 39 | } |