Changeset

3451:6402a9defcdc

tests/test_util_jid.lua: Better formatting, comments, and stop giving 5 arguments to a 4-argument function (thanks Asterix :) )
author Matthew Wild <mwild1@gmail.com>
date Tue, 10 Aug 2010 14:07:03 +0100 (2010-08-10)
parents 3450:4bd78a5fee75
children 3452:2d1a5d8893c2
files tests/test_util_jid.lua
diffstat 1 files changed, 7 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/tests/test_util_jid.lua	Sat Aug 07 19:00:04 2010 +0100
+++ b/tests/test_util_jid.lua	Tue Aug 10 14:07:03 2010 +0100
@@ -25,15 +25,18 @@
 		assert_equal(expected_server, rserver, "split("..tostring(input_jid)..") failed");
 		assert_equal(expected_resource, rresource, "split("..tostring(input_jid)..") failed");
 	end
+
+	-- Valid JIDs
 	test("node@server", 		"node", "server", nil		);
 	test("node@server/resource", 	"node", "server", "resource"	);
 	test("server", 			nil, 	"server", nil		);
 	test("server/resource", 	nil, 	"server", "resource"	);
-	test(nil,			nil,	nil	, nil		);
 
-	test("node@/server", nil, nil, nil , nil );
-	test("@server",      nil, nil, nil , nil );
-	test("@server/resource",nil,nil,nil, nil );
+	-- Always invalid JIDs
+	test(nil,                nil, nil, nil);
+	test("node@/server",     nil, nil, nil);
+	test("@server",          nil, nil, nil);
+	test("@server/resource", nil, nil, nil);
 end
 
 function bare(bare)