(t *testing.T)
| 13 | import "testing" |
| 14 | |
| 15 | func TestPostLede(t *testing.T) { |
| 16 | text := map[string]string{ |
| 17 | "早安。跨出舒適圈,才能前往": "早安。", |
| 18 | "早安。This is my post. It is great.": "早安。", |
| 19 | "Hello. 早安。": "Hello.", |
| 20 | "Sup? Everyone says punctuation is punctuation.": "Sup?", |
| 21 | "Humans are humans, and society is full of good and bad actors. Technology, at the most fundamental level, is a neutral tool that can be used by either to meet any ends. ": "Humans are humans, and society is full of good and bad actors.", |
| 22 | `Online Domino Is Must For Everyone |
| 23 | |
| 24 | Do you want to understand how to play poker online?`: "Online Domino Is Must For Everyone", |
| 25 | `おはようございます |
| 26 | |
| 27 | 私は日本から帰ったばかりです。`: "おはようございます", |
| 28 | "Hello, we say, おはよう. We say \"good morning\"": "Hello, we say, おはよう.", |
| 29 | } |
| 30 | |
| 31 | c := 1 |
| 32 | for i, o := range text { |
| 33 | if s := PostLede(i, true); s != o { |
| 34 | t.Errorf("#%d: Got '%s' from '%s'; expected '%s'", c, s, i, o) |
| 35 | } |
| 36 | c++ |
| 37 | } |
| 38 | } |
| 39 | |
| 40 | func TestTruncToWord(t *testing.T) { |
| 41 | text := map[string]string{ |
nothing calls this directly
no test coverage detected