From 32af48e442a960b8c3f199f5ffad28a34590fcda Mon Sep 17 00:00:00 2001 From: Matěj Cepl Date: Thu, 28 Apr 2011 13:28:55 +0200 Subject: Reformatting to MoFo coding style --- tests/test-xmlrpc.js | 39 ++++++++++++++++++++------------------- 1 file changed, 20 insertions(+), 19 deletions(-) (limited to 'tests/test-xmlrpc.js') diff --git a/tests/test-xmlrpc.js b/tests/test-xmlrpc.js index f3f2e56..78bf9d5 100644 --- a/tests/test-xmlrpc.js +++ b/tests/test-xmlrpc.js @@ -2,21 +2,21 @@ /*jslint plusplus: false */ "use strict"; var xrpc = require("xmlrpc"); -var xmlOut = "\n" + - "\nbugzilla.updateAttachMimeType\n" + - "\n\n\n\nattach_id\n" + - "myId\n\n\n" + - "mime_type\ntext/plain\n\n" + - "\nnomail\nbillg@microsoft.com" + - "\n\n\n\n\n\n" + - "me@example.com\n\n" + - "\nsecret\n\n" + - "\n3.14\n\n" + - "\n1\n\n" + - "\n"; +var xmlOut = "\n" + + "\nbugzilla.updateAttachMimeType\n" + + "\n\n\n\nattach_id\n" + + "myId\n\n\n" + + "mime_type\ntext/plain\n\n" + + "\nnomail\nbillg@microsoft.com" + + "\n\n\n\n\n\n" + + "me@example.com\n\n" + + "\nsecret\n\n" + + "\n3.14\n\n" + + "\n1\n\n" + + "\n"; -exports.ensureLeadingZero = function (test) { - test.assert(typeof(xrpc.leadingZero) == "function"); +exports.ensureLeadingZero = function(test) { + test.assert(typeof (xrpc.leadingZero) == "function"); test.assertEqual(xrpc.leadingZero("1"), "01"); test.assertEqual(xrpc.leadingZero(1), "01"); test.assertEqual(xrpc.leadingZero("11"), "11"); @@ -25,12 +25,13 @@ exports.ensureLeadingZero = function (test) { test.assertEqual(xrpc.leadingZero(111), "111"); test.assertEqual(xrpc.leadingZero("-1"), "-1"); test.assertEqual(xrpc.leadingZero(-1), "-1"); - test.assertEqual(xrpc.leadingZero("zzz"),"zzz"); + test.assertEqual(xrpc.leadingZero("zzz"), "zzz"); }; // testing xrpc.XMLRPCMessage -exports.ensureGenerateXMLRPC = function (test) { - var msg = new xrpc.XMLRPCMessage("bugzilla.updateAttachMimeType"); +exports.ensureGenerateXMLRPC = function(test) { + var msg = new xrpc.XMLRPCMessage( + "bugzilla.updateAttachMimeType"); msg.addParameter({ 'attach_id' : "myId", 'mime_type' : "text/plain", @@ -40,6 +41,6 @@ exports.ensureGenerateXMLRPC = function (test) { msg.addParameter("secret"); msg.addParameter(3.14); msg.addParameter(true); - test.assertEqual(msg.xml(), xmlOut, - "generate XML-RPC message"); + test + .assertEqual(msg.xml(), xmlOut, "generate XML-RPC message"); }; -- cgit