Repository: thrift Updated Branches: refs/heads/master 4e1ea1101 -> 085627309
fix whitespaces detected by .editorconfig Project: http://git-wip-us.apache.org/repos/asf/thrift/repo Commit: http://git-wip-us.apache.org/repos/asf/thrift/commit/08562730 Tree: http://git-wip-us.apache.org/repos/asf/thrift/tree/08562730 Diff: http://git-wip-us.apache.org/repos/asf/thrift/diff/08562730 Branch: refs/heads/master Commit: 085627309591a78e2c7d4c2168ad4b0939cc4f2e Parents: 4e1ea11 Author: Roger Meier <[email protected]> Authored: Sun Jun 14 22:30:22 2015 +0200 Committer: Roger Meier <[email protected]> Committed: Sun Jun 14 22:30:22 2015 +0200 ---------------------------------------------------------------------- lib/js/test/build.xml | 3 +-- lib/js/test/phantomjs-qunit.js | 2 +- lib/js/test/test.html | 2 +- lib/js/test/test.js | 30 +++++++++++++++--------------- 4 files changed, 18 insertions(+), 19 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/thrift/blob/08562730/lib/js/test/build.xml ---------------------------------------------------------------------- diff --git a/lib/js/test/build.xml b/lib/js/test/build.xml index af1840d..9be73cf 100755 --- a/lib/js/test/build.xml +++ b/lib/js/test/build.xml @@ -267,8 +267,7 @@ <fileset refid="js.test.dependency.jars"/> <mapper type="flatten"/> </copy> - + <property name="mvn.finished" value="true"/> </target> </project> - http://git-wip-us.apache.org/repos/asf/thrift/blob/08562730/lib/js/test/phantomjs-qunit.js ---------------------------------------------------------------------- diff --git a/lib/js/test/phantomjs-qunit.js b/lib/js/test/phantomjs-qunit.js index b7b8012..a840db6 100755 --- a/lib/js/test/phantomjs-qunit.js +++ b/lib/js/test/phantomjs-qunit.js @@ -43,7 +43,7 @@ function waitFor(testFx, onReady, timeOutMillis) { eval(onReady); } else { onReady(); //< Do what it's supposed to do once the condition is fulfilled - } + } clearInterval(interval); //< Stop this interval } } http://git-wip-us.apache.org/repos/asf/thrift/blob/08562730/lib/js/test/test.html ---------------------------------------------------------------------- diff --git a/lib/js/test/test.html b/lib/js/test/test.html index c654e8c..edec3a3 100755 --- a/lib/js/test/test.html +++ b/lib/js/test/test.html @@ -1,4 +1,4 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file http://git-wip-us.apache.org/repos/asf/thrift/blob/08562730/lib/js/test/test.js ---------------------------------------------------------------------- diff --git a/lib/js/test/test.js b/lib/js/test/test.js index 01d09ce..ee14612 100755 --- a/lib/js/test/test.js +++ b/lib/js/test/test.js @@ -17,7 +17,7 @@ * under the License. */ /* jshint -W100 */ - + /* * JavaScript test suite for ThriftTest.thrift. These tests * will run against Normal (-gen js) and jQuery (-gen js:jquery) @@ -26,15 +26,15 @@ * Synchronous blocking calls should be identical in both * Normal and jQuery interfaces. All synchronous tests belong * here. - * - * Asynchronous success callbacks passed as the last parameter + * + * Asynchronous success callbacks passed as the last parameter * of an RPC call should be identical in both Normal and jQuery * interfaces. Async success tests belong here. - * + * * Asynchronous exception processing is different in Normal * and jQuery interfaces. Such tests belong in the test-nojq.js * or test-jq.js files respectively. jQuery specific XHR object - * tests also belong in test-jq.js. Do not create any jQuery + * tests also belong in test-jq.js. Do not create any jQuery * dependencies in this file or in test-nojq.js * * To compile client code for this test use: @@ -43,7 +43,7 @@ * $ thrift -gen js:jquery ThriftTest.thrift * * See also: - * ++ test-nojq.js for "-gen js" only tests + * ++ test-nojq.js for "-gen js" only tests * ++ test-jq.js for "-gen js:jquery" only tests */ @@ -68,7 +68,7 @@ if (typeof QUnit.log == 'function') { // all Languages in UTF-8 var stringTest = "Afrikaans, Alemannisch, Aragonés, Ø§ÙØ¹Ø±Ø¨ÙØ©, ٠صرÙ, Asturianu, Aymar aru, AzÉrbaycan, ÐаÑҡоÑÑ, Boarisch, ŽemaitÄÅ¡ka, ÐелаÑÑÑкаÑ, ÐелаÑÑÑÐºÐ°Ñ (ÑаÑаÑкевÑÑа), ÐÑлгаÑÑки, Bamanankan, বাà¦à¦²à¦¾, Brezhoneg, Bosanski, Català , Mìng-dÄ̤ng-ngá¹³Ì, ÐÐ¾Ñ Ñийн, Cebuano, á£á³á©, Äesky, СловѣÌнÑÑÐºÑ / â°â°â°â°â°¡â°â° â°â°â°, ЧÓваÑла, Cymraeg, Dansk, Zazaki, ÞÞ¨ÞÞ¬ÞÞ¨ÞÞ¦ÞÞ°, Îλληνικά, Emilià n e rumagnòl, English, Esperanto, Español, Eesti, Euskara, ÙØ§Ø±Ø³Û, Suomi, Võro, Føroyskt, Français, Arpetan, Furlan, Frysk, Gaeilge, è´èª, Gà idhlig, Galego, Avañe'ẽ, àªà«àªàª°àª¾àª¤à«, Gaelg, ×¢×ר×ת, हिनà¥à¤¦à¥, Fiji Hindi, Hrvatski, Kreyòl ayisyen, Magyar, ÕÕ¡ÕµÕ¥ÖÕ¥Õ¶, Interlingua, Bahasa Indonesia, Ilokano, Ido, Ãslenska, Italiano, æ¥æ¬èª, Lojban, Basa Jawa, á¥áá áá£áá, Kongo, Kalaallisut, à²à²¨à³à²¨à²¡, íêµì´, ÐÑаÑа Ñай-ÐалкÑаÑ, Ripoarisch, Kurdî, Ðоми, Kernewek, ÐÑÑгÑзÑа, Latina, Ladino, Lëtzebuergesch, Limburgs, Lingála, ລາວ, Lietuvių, LatvieÅ¡u, Basa Banyumasan, Malagasy, ÐакедонÑки, മലയാളà´, मराठà¥, Bahasa Melayu, Ù Ø§Ø²ÙØ±ÙÙÛ, Nnapulitano, Nedersaksisch, नà¥à¤ªà¤¾à¤² à¤à¤¾à¤·à¤¾, Nederlands, âªNorsk (nynorsk)â¬, âªNorsk (bokmÃ¥l)â¬, Nouormand, Diné bizaad, Occitan, ÐÑонаÑ, Papiamentu, Deitsch, Norfuk / Pitkern, Polski, Ù¾ÙØ¬Ø§Ø¨Û, Ù¾ÚØªÙ, Português, Runa Simi, Rumantsch, Romani, RomânÄ, Ð ÑÑÑкий, Ð¡Ð°Ñ Ð° ÑÑла, Sardu, Sicilianu, Scots, Sámegiella, Simple English, SlovenÄina, SlovenÅ¡Äina, СÑпÑки / Srpski, Seeltersk, Svenska, Kiswahili, தமிழà¯, à°¤à±à°²à±à°à±, Тоҷикӣ, à¹à¸à¸¢, Türkmençe, Tagalog, Türkçe, ТаÑаÑÑа/Tatarça, УкÑаÑнÑÑка, اردÙ, Tiếng Viá»t, Volapük, Walon, Winaray, å´è¯, isiXhosa, ××Ö´××ש, Yorùbá, Zeêuws, 䏿, B ân-lâm-gú, ç²µèª"; - + function checkRecursively(map1, map2) { if (typeof map1 !== 'function' && typeof map2 !== 'function') { if (!map1 || typeof map1 !== 'object') { @@ -136,7 +136,7 @@ module("Structured Types"); equal(structTestOutput.byte_thing, structTestInput.byte_thing); equal(structTestOutput.i32_thing, structTestInput.i32_thing); equal(structTestOutput.i64_thing, structTestInput.i64_thing); - + equal(JSON.stringify(structTestOutput), JSON.stringify(structTestInput)); }); @@ -147,21 +147,21 @@ module("Structured Types"); xtrTestInput.i32_thing = Math.pow(2,30); //This is usually 2^60 but JS cannot represent anything over 2^52 accurately xtrTestInput.i64_thing = Math.pow(2,52); - + var nestTestInput = new ThriftTest.Xtruct2(); nestTestInput.byte_thing = 0x02; nestTestInput.struct_thing = xtrTestInput; nestTestInput.i32_thing = Math.pow(2,15); - + var nestTestOutput = client.testNest(nestTestInput); - + equal(nestTestOutput.byte_thing, nestTestInput.byte_thing); equal(nestTestOutput.struct_thing.string_thing, nestTestInput.struct_thing.string_thing); equal(nestTestOutput.struct_thing.byte_thing, nestTestInput.struct_thing.byte_thing); equal(nestTestOutput.struct_thing.i32_thing, nestTestInput.struct_thing.i32_thing); equal(nestTestOutput.struct_thing.i64_thing, nestTestInput.struct_thing.i64_thing); equal(nestTestOutput.i32_thing, nestTestInput.i32_thing); - + equal(JSON.stringify(nestTestOutput), JSON.stringify(nestTestInput)); }); @@ -217,7 +217,7 @@ module("Structured Types"); input.readMessageBegin(); input.readStructBegin(); - // read Xtruct data with Xtruct3 + // read Xtruct data with Xtruct3 input.readFieldBegin(); xtruct3.read(input); input.readFieldEnd(); @@ -262,7 +262,7 @@ module("deeper!"); equal(mapMapTestOutput[key][key2], mapMapTestExpectedResult[key][key2]); } } - + checkRecursively(mapMapTestOutput, mapMapTestExpectedResult); }); @@ -289,7 +289,7 @@ module("Exception"); test("TException", function() { //ThriftTest does not list TException as a legal exception so it will - // generate an exception on the server that does not propagate back to + // generate an exception on the server that does not propagate back to // the client. This test has been modified to equate to "no exception" expect(1); try{
