| 824 | } |
| 825 | |
| 826 | func TestConcat(t *testing.T) { |
| 827 | t.Parallel() |
| 828 | |
| 829 | assert := internal.NewAssert(t, "TestConcat") |
| 830 | |
| 831 | tests := []struct { |
| 832 | args []string |
| 833 | expected string |
| 834 | }{ |
| 835 | {[]string{}, ""}, |
| 836 | {[]string{"a"}, "a"}, |
| 837 | {[]string{"a", "b"}, "ab"}, |
| 838 | {[]string{"a", "b", "c"}, "abc"}, |
| 839 | {[]string{"a", "", "b", "c", ""}, "abc"}, |
| 840 | {[]string{"你好", ",", "", "世界!", ""}, "你好,世界!"}, |
| 841 | {[]string{"Hello", " Wo", "r", "ld!", ""}, "Hello World!"}, |
| 842 | } |
| 843 | |
| 844 | for _, tt := range tests { |
| 845 | assert.Equal(tt.expected, Concat(0, tt.args...)) |
| 846 | } |
| 847 | } |
| 848 | |
| 849 | func TestEllipsis(t *testing.T) { |
| 850 | t.Parallel() |