package irc

import "testing"

func TestMessageString(t *testing.T) {
	type tcase struct {
		msg Message;
		expected string;
	};
	cases := []tcase {
		tcase {
			Message{Command: "command", Params: []string{}},
			"command"
		},
		tcase {
			Message{Command: "command", Params: []string{"one"}},
			"command :one"
		},
		tcase {
			Message{Command: "command", Params: []string{"one", "two"}},
			"command one :two"
		},
		tcase {
			Message{"prefix", "command", []string{"one", "two", "three four"}},
			":prefix command one two :three four"
		},
	};

	for i, tc := range cases {
		s := tc.msg.String();
		if s != tc.expected {
			t.Errorf("Case %d: expected \"%s\", got \"%s\"", i, tc.expected, s)
		}
	}
}

package irc

import "testing"

func TestMessageString(t *testing.T) {
	type tcase struct {
		msg Message;
		expected string;
	};
	cases := []tcase {
		tcase {
			Message{Command: "command", Params: []string{}},
			"command"
		},
		tcase {
			Message{Command: "command", Params: []string{"one"}},
			"command :one"
		},
		tcase {
			Message{Command: "command", Params: []string{"one", "two"}},
			"command one :two"
		},
		tcase {
			Message{"prefix", "command", []string{"one", "two", "three four"}},
			":prefix command one two :three four"
		},
		tcase {
			Message{Prefix: "prefix", Command: "command"},
			"asdf"
		},
	};

	for i, tc := range cases {
		s := tc.msg.String();
		if s != tc.expected {
			t.Errorf("Case %d: expected \"%s\", got \"%s\"", i, tc.expected, s)
		}
	}
}

--- 
+++ 
@@ -24,10 +24,6 @@
 			Message{"prefix", "command", []string{"one", "two", "three four"}},
 			":prefix command one two :three four"
 		},
-		tcase {
-			Message{Prefix: "prefix", Command: "command"},
-			"asdf"
-		},
 	};
 
 	for i, tc := range cases {
Remove dummy failure test case
