From 2be33a9b7fc19ba0fd44036e3da9e5adc0671a7c Mon Sep 17 00:00:00 2001 From: Emanuel Hoogeveen Date: Tue, 23 Jul 2013 17:34:18 -0700 Subject: [PATCH] Bug 888088 (part 5) - Fix #include ordering in js/src/jsapi-tests/. r=nnethercote. --HG-- extra : rebase_source : 56497f40602cfe7af70cb8f439861a16f5608135 --- js/src/jsapi-tests/selfTest.cpp | 1 - .../jsapi-tests/testAddPropertyPropcache.cpp | 1 - js/src/jsapi-tests/testArgumentsObject.cpp | 1 - js/src/jsapi-tests/testArrayBuffer.cpp | 3 ++- js/src/jsapi-tests/testBug604087.cpp | 3 ++- js/src/jsapi-tests/testClassGetter.cpp | 1 - js/src/jsapi-tests/testCloneScript.cpp | 2 +- js/src/jsapi-tests/testConservativeGC.cpp | 3 ++- js/src/jsapi-tests/testCustomIterator.cpp | 4 ++-- js/src/jsapi-tests/testDebugger.cpp | 4 ++-- js/src/jsapi-tests/testDeepFreeze.cpp | 1 - .../testDefineGetterSetterNonEnumerable.cpp | 1 - js/src/jsapi-tests/testDefineProperty.cpp | 1 - js/src/jsapi-tests/testEnclosingFunction.cpp | 5 +++-- js/src/jsapi-tests/testErrorCopying.cpp | 2 +- js/src/jsapi-tests/testException.cpp | 1 - js/src/jsapi-tests/testExternalStrings.cpp | 4 ++-- js/src/jsapi-tests/testFindSCCs.cpp | 6 ++---- js/src/jsapi-tests/testFuncCallback.cpp | 5 +++-- js/src/jsapi-tests/testFunctionProperties.cpp | 1 - js/src/jsapi-tests/testGCFinalizeCallback.cpp | 6 +++--- js/src/jsapi-tests/testGCOutOfMemory.cpp | 3 ++- js/src/jsapi-tests/testGetPropertyDefault.cpp | 1 - js/src/jsapi-tests/testHashTable.cpp | 3 +-- js/src/jsapi-tests/testHashTableInit.cpp | 3 +-- js/src/jsapi-tests/testIndexToString.cpp | 5 ++--- js/src/jsapi-tests/testIntString.cpp | 1 - js/src/jsapi-tests/testIntTypesABI.cpp | 5 ++--- js/src/jsapi-tests/testIntern.cpp | 2 +- js/src/jsapi-tests/testLookup.cpp | 2 +- js/src/jsapi-tests/testLooselyEqual.cpp | 3 ++- js/src/jsapi-tests/testNewObject.cpp | 3 +-- js/src/jsapi-tests/testOOM.cpp | 4 ++-- js/src/jsapi-tests/testOps.cpp | 1 - js/src/jsapi-tests/testOriginPrincipals.cpp | 3 ++- js/src/jsapi-tests/testParseJSON.cpp | 4 ++-- js/src/jsapi-tests/testProfileStrings.cpp | 3 +-- js/src/jsapi-tests/testPropCache.cpp | 1 - .../testRegExpInstanceProperties.cpp | 4 +--- js/src/jsapi-tests/testResolveRecursion.cpp | 1 - js/src/jsapi-tests/testSameValue.cpp | 1 - js/src/jsapi-tests/testScriptInfo.cpp | 2 +- js/src/jsapi-tests/testScriptObject.cpp | 1 - js/src/jsapi-tests/testSetProperty.cpp | 1 - js/src/jsapi-tests/testSourcePolicy.cpp | 3 ++- js/src/jsapi-tests/testStringBuffer.cpp | 4 +--- js/src/jsapi-tests/testToIntWidth.cpp | 4 +--- js/src/jsapi-tests/testTrap.cpp | 2 +- js/src/jsapi-tests/testTypedArrays.cpp | 2 +- js/src/jsapi-tests/testUTF8.cpp | 3 ++- js/src/jsapi-tests/testXDR.cpp | 5 +++-- js/src/jsapi-tests/tests.cpp | 7 +++++-- js/src/jsapi-tests/tests.h | 20 +++++++++---------- 53 files changed, 72 insertions(+), 91 deletions(-) diff --git a/js/src/jsapi-tests/selfTest.cpp b/js/src/jsapi-tests/selfTest.cpp index 6df57757bde..b78e265378f 100644 --- a/js/src/jsapi-tests/selfTest.cpp +++ b/js/src/jsapi-tests/selfTest.cpp @@ -5,7 +5,6 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - #include "jsapi-tests/tests.h" BEGIN_TEST(selfTest_NaNsAreSame) diff --git a/js/src/jsapi-tests/testAddPropertyPropcache.cpp b/js/src/jsapi-tests/testAddPropertyPropcache.cpp index 59a41b49276..b8d229fb1d1 100644 --- a/js/src/jsapi-tests/testAddPropertyPropcache.cpp +++ b/js/src/jsapi-tests/testAddPropertyPropcache.cpp @@ -5,7 +5,6 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - #include "jsapi-tests/tests.h" /* Do the test a bunch of times, because sometimes we seem to randomly diff --git a/js/src/jsapi-tests/testArgumentsObject.cpp b/js/src/jsapi-tests/testArgumentsObject.cpp index 0b53e03285e..daa2a7ac488 100644 --- a/js/src/jsapi-tests/testArgumentsObject.cpp +++ b/js/src/jsapi-tests/testArgumentsObject.cpp @@ -5,7 +5,6 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - #include "jsapi-tests/tests.h" #include "vm/Stack-inl.h" diff --git a/js/src/jsapi-tests/testArrayBuffer.cpp b/js/src/jsapi-tests/testArrayBuffer.cpp index 78864fc5de3..0c6a39465b6 100644 --- a/js/src/jsapi-tests/testArrayBuffer.cpp +++ b/js/src/jsapi-tests/testArrayBuffer.cpp @@ -2,9 +2,10 @@ * vim: set ts=8 sts=4 et sw=4 tw=99: */ -#include "jsapi-tests/tests.h" #include "jsfriendapi.h" +#include "jsapi-tests/tests.h" + #define NUM_TEST_BUFFERS 2 #define MAGIC_VALUE_1 3 #define MAGIC_VALUE_2 17 diff --git a/js/src/jsapi-tests/testBug604087.cpp b/js/src/jsapi-tests/testBug604087.cpp index 5f72b9aa99b..f998a107ebc 100644 --- a/js/src/jsapi-tests/testBug604087.cpp +++ b/js/src/jsapi-tests/testBug604087.cpp @@ -7,10 +7,11 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -#include "jsapi-tests/tests.h" #include "jsobj.h" #include "jswrapper.h" +#include "jsapi-tests/tests.h" + #include "jsobjinlines.h" struct OuterWrapper : js::Wrapper diff --git a/js/src/jsapi-tests/testClassGetter.cpp b/js/src/jsapi-tests/testClassGetter.cpp index 0b07bb17982..6796e5649cf 100644 --- a/js/src/jsapi-tests/testClassGetter.cpp +++ b/js/src/jsapi-tests/testClassGetter.cpp @@ -7,7 +7,6 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - #include "jsapi-tests/tests.h" int called_test_fn; diff --git a/js/src/jsapi-tests/testCloneScript.cpp b/js/src/jsapi-tests/testCloneScript.cpp index a4591af5559..70a1e9f1fae 100644 --- a/js/src/jsapi-tests/testCloneScript.cpp +++ b/js/src/jsapi-tests/testCloneScript.cpp @@ -7,9 +7,9 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +#include "jsdbgapi.h" #include "jsapi-tests/tests.h" -#include "jsdbgapi.h" BEGIN_TEST(test_cloneScript) { diff --git a/js/src/jsapi-tests/testConservativeGC.cpp b/js/src/jsapi-tests/testConservativeGC.cpp index 1a3ed6ce089..3d4dea46f7f 100644 --- a/js/src/jsapi-tests/testConservativeGC.cpp +++ b/js/src/jsapi-tests/testConservativeGC.cpp @@ -4,8 +4,9 @@ #if !defined(JSGC_ROOT_ANALYSIS) && !defined(JSGC_USE_EXACT_ROOTING) -#include "jsapi-tests/tests.h" #include "jsobj.h" + +#include "jsapi-tests/tests.h" #include "vm/String.h" #include "jsobjinlines.h" diff --git a/js/src/jsapi-tests/testCustomIterator.cpp b/js/src/jsapi-tests/testCustomIterator.cpp index f02c73f6ebe..eb772c4a53a 100644 --- a/js/src/jsapi-tests/testCustomIterator.cpp +++ b/js/src/jsapi-tests/testCustomIterator.cpp @@ -2,10 +2,10 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -#include "jsapi-tests/tests.h" - #include "jsclass.h" +#include "jsapi-tests/tests.h" + int count = 0; static JSBool diff --git a/js/src/jsapi-tests/testDebugger.cpp b/js/src/jsapi-tests/testDebugger.cpp index 060cb782eda..12860ddd444 100644 --- a/js/src/jsapi-tests/testDebugger.cpp +++ b/js/src/jsapi-tests/testDebugger.cpp @@ -5,10 +5,10 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +#include "jscntxt.h" +#include "jsdbgapi.h" #include "jsapi-tests/tests.h" -#include "jsdbgapi.h" -#include "jscntxt.h" static int callCount[2] = {0, 0}; diff --git a/js/src/jsapi-tests/testDeepFreeze.cpp b/js/src/jsapi-tests/testDeepFreeze.cpp index c1ff9ab2e1a..6e51df8df8b 100644 --- a/js/src/jsapi-tests/testDeepFreeze.cpp +++ b/js/src/jsapi-tests/testDeepFreeze.cpp @@ -5,7 +5,6 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - #include "jsapi-tests/tests.h" BEGIN_TEST(testDeepFreeze_bug535703) diff --git a/js/src/jsapi-tests/testDefineGetterSetterNonEnumerable.cpp b/js/src/jsapi-tests/testDefineGetterSetterNonEnumerable.cpp index a7f9af27e37..1299f00eb85 100644 --- a/js/src/jsapi-tests/testDefineGetterSetterNonEnumerable.cpp +++ b/js/src/jsapi-tests/testDefineGetterSetterNonEnumerable.cpp @@ -5,7 +5,6 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - #include "jsapi-tests/tests.h" static JSBool diff --git a/js/src/jsapi-tests/testDefineProperty.cpp b/js/src/jsapi-tests/testDefineProperty.cpp index be4fd58e72b..493d231d33b 100644 --- a/js/src/jsapi-tests/testDefineProperty.cpp +++ b/js/src/jsapi-tests/testDefineProperty.cpp @@ -5,7 +5,6 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - #include "jsapi-tests/tests.h" BEGIN_TEST(testDefineProperty_bug564344) diff --git a/js/src/jsapi-tests/testEnclosingFunction.cpp b/js/src/jsapi-tests/testEnclosingFunction.cpp index 888cd8350b5..118c55daa2d 100644 --- a/js/src/jsapi-tests/testEnclosingFunction.cpp +++ b/js/src/jsapi-tests/testEnclosingFunction.cpp @@ -7,9 +7,10 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -#include "jsapi-tests/tests.h" -#include "jsfriendapi.h" #include "jsdbgapi.h" +#include "jsfriendapi.h" + +#include "jsapi-tests/tests.h" using namespace js; diff --git a/js/src/jsapi-tests/testErrorCopying.cpp b/js/src/jsapi-tests/testErrorCopying.cpp index a9559d20148..e249229bc92 100644 --- a/js/src/jsapi-tests/testErrorCopying.cpp +++ b/js/src/jsapi-tests/testErrorCopying.cpp @@ -8,9 +8,9 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +#include "jscntxt.h" #include "jsapi-tests/tests.h" -#include "jscntxt.h" static uint32_t column = 0; diff --git a/js/src/jsapi-tests/testException.cpp b/js/src/jsapi-tests/testException.cpp index e375229479b..78602e9dd26 100644 --- a/js/src/jsapi-tests/testException.cpp +++ b/js/src/jsapi-tests/testException.cpp @@ -5,7 +5,6 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - #include "jsapi-tests/tests.h" BEGIN_TEST(testException_bug860435) diff --git a/js/src/jsapi-tests/testExternalStrings.cpp b/js/src/jsapi-tests/testExternalStrings.cpp index 414cf4acf82..9394b408249 100644 --- a/js/src/jsapi-tests/testExternalStrings.cpp +++ b/js/src/jsapi-tests/testExternalStrings.cpp @@ -5,10 +5,10 @@ #include "mozilla/PodOperations.h" #include "mozilla/Util.h" -#include "jsapi-tests/tests.h" - #include "jsutil.h" +#include "jsapi-tests/tests.h" + using mozilla::ArrayLength; using mozilla::PodEqual; diff --git a/js/src/jsapi-tests/testFindSCCs.cpp b/js/src/jsapi-tests/testFindSCCs.cpp index 28a3318c616..55032317bf8 100644 --- a/js/src/jsapi-tests/testFindSCCs.cpp +++ b/js/src/jsapi-tests/testFindSCCs.cpp @@ -5,16 +5,14 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -#include "jsapi-tests/tests.h" - -#include #include +#include #include "jscntxt.h" #include "jsgc.h" #include "gc/FindSCCs.h" +#include "jsapi-tests/tests.h" static const unsigned MaxVertices = 10; diff --git a/js/src/jsapi-tests/testFuncCallback.cpp b/js/src/jsapi-tests/testFuncCallback.cpp index 1e735e9f31a..9d1974b30cf 100644 --- a/js/src/jsapi-tests/testFuncCallback.cpp +++ b/js/src/jsapi-tests/testFuncCallback.cpp @@ -2,9 +2,10 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -#include "jsapi-tests/tests.h" -#include "jsfun.h" #include "jscntxt.h" +#include "jsfun.h" + +#include "jsapi-tests/tests.h" #ifdef MOZ_TRACE_JSCALLS diff --git a/js/src/jsapi-tests/testFunctionProperties.cpp b/js/src/jsapi-tests/testFunctionProperties.cpp index 98e4d1b4f5d..22a223cc8d2 100644 --- a/js/src/jsapi-tests/testFunctionProperties.cpp +++ b/js/src/jsapi-tests/testFunctionProperties.cpp @@ -5,7 +5,6 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - #include "jsapi-tests/tests.h" BEGIN_TEST(testFunctionProperties) diff --git a/js/src/jsapi-tests/testGCFinalizeCallback.cpp b/js/src/jsapi-tests/testGCFinalizeCallback.cpp index efb16b4a263..cd763219d4d 100644 --- a/js/src/jsapi-tests/testGCFinalizeCallback.cpp +++ b/js/src/jsapi-tests/testGCFinalizeCallback.cpp @@ -2,12 +2,12 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -#include "jsapi-tests/tests.h" - #include -#include "jsfriendapi.h" #include "jscntxt.h" +#include "jsfriendapi.h" + +#include "jsapi-tests/tests.h" #include "vm/ObjectImpl-inl.h" diff --git a/js/src/jsapi-tests/testGCOutOfMemory.cpp b/js/src/jsapi-tests/testGCOutOfMemory.cpp index 149464f64de..d8779a55a62 100644 --- a/js/src/jsapi-tests/testGCOutOfMemory.cpp +++ b/js/src/jsapi-tests/testGCOutOfMemory.cpp @@ -6,9 +6,10 @@ * Contributor: Igor Bukanov */ -#include "jsapi-tests/tests.h" #include "jscntxt.h" +#include "jsapi-tests/tests.h" + static unsigned errorCount = 0; static void diff --git a/js/src/jsapi-tests/testGetPropertyDefault.cpp b/js/src/jsapi-tests/testGetPropertyDefault.cpp index be41d4ab525..0b7092e65c4 100644 --- a/js/src/jsapi-tests/testGetPropertyDefault.cpp +++ b/js/src/jsapi-tests/testGetPropertyDefault.cpp @@ -5,7 +5,6 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - #include "jsapi-tests/tests.h" #define JSVAL_IS_FALSE(x) ((JSVAL_IS_BOOLEAN(x)) && !(JSVAL_TO_BOOLEAN(x))) diff --git a/js/src/jsapi-tests/testHashTable.cpp b/js/src/jsapi-tests/testHashTable.cpp index 9b132536d07..a20fd590abe 100644 --- a/js/src/jsapi-tests/testHashTable.cpp +++ b/js/src/jsapi-tests/testHashTable.cpp @@ -2,9 +2,8 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -#include "jsapi-tests/tests.h" - #include "js/HashTable.h" +#include "jsapi-tests/tests.h" //#define FUZZ diff --git a/js/src/jsapi-tests/testHashTableInit.cpp b/js/src/jsapi-tests/testHashTableInit.cpp index a43079c4923..c7214a4079f 100644 --- a/js/src/jsapi-tests/testHashTableInit.cpp +++ b/js/src/jsapi-tests/testHashTableInit.cpp @@ -2,9 +2,8 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -#include "jsapi-tests/tests.h" - #include "js/HashTable.h" +#include "jsapi-tests/tests.h" typedef js::HashSet, js::SystemAllocPolicy> IntSet; diff --git a/js/src/jsapi-tests/testIndexToString.cpp b/js/src/jsapi-tests/testIndexToString.cpp index 9a51e5b9522..6b33aa6b882 100644 --- a/js/src/jsapi-tests/testIndexToString.cpp +++ b/js/src/jsapi-tests/testIndexToString.cpp @@ -5,14 +5,13 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -#include "jsapi-tests/tests.h" - #include "jscntxt.h" #include "jscompartment.h" #include "jsnum.h" #include "jsstr.h" +#include "jsapi-tests/tests.h" + #include "vm/String-inl.h" using mozilla::ArrayLength; diff --git a/js/src/jsapi-tests/testIntString.cpp b/js/src/jsapi-tests/testIntString.cpp index 3a9cb74e7f0..112c277f373 100644 --- a/js/src/jsapi-tests/testIntString.cpp +++ b/js/src/jsapi-tests/testIntString.cpp @@ -5,7 +5,6 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - #include "jsapi-tests/tests.h" #include "vm/String.h" diff --git a/js/src/jsapi-tests/testIntTypesABI.cpp b/js/src/jsapi-tests/testIntTypesABI.cpp index 81032136a27..ef092266862 100644 --- a/js/src/jsapi-tests/testIntTypesABI.cpp +++ b/js/src/jsapi-tests/testIntTypesABI.cpp @@ -2,15 +2,13 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -#include "jsapi-tests/tests.h" - /* * This test exercises the full, deliberately-exposed JSAPI interface to ensure * that no internal integer typedefs leak out. Include every intentionally * public header file (and those headers included by them, for completeness), * even the ones tests.h itself included, to verify this. */ -#include "js-config.h" + #include "jsapi.h" #include "jsclass.h" #include "jscpucfg.h" @@ -29,6 +27,7 @@ #include "js/Utility.h" #include "js/Value.h" #include "js/Vector.h" +#include "jsapi-tests/tests.h" /* * Verify that our public (and intended to be public, versus being that way diff --git a/js/src/jsapi-tests/testIntern.cpp b/js/src/jsapi-tests/testIntern.cpp index 38fe814fe86..87785b38b77 100644 --- a/js/src/jsapi-tests/testIntern.cpp +++ b/js/src/jsapi-tests/testIntern.cpp @@ -2,10 +2,10 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -#include "jsapi-tests/tests.h" #include "jsatom.h" #include "gc/Marking.h" +#include "jsapi-tests/tests.h" #include "vm/String.h" using mozilla::ArrayLength; diff --git a/js/src/jsapi-tests/testLookup.cpp b/js/src/jsapi-tests/testLookup.cpp index f3ac8a5843d..6298df5e67b 100644 --- a/js/src/jsapi-tests/testLookup.cpp +++ b/js/src/jsapi-tests/testLookup.cpp @@ -5,9 +5,9 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +#include "jsfun.h" // for js::IsInternalFunctionObject #include "jsapi-tests/tests.h" -#include "jsfun.h" // for js::IsInternalFunctionObject #include "jsobjinlines.h" diff --git a/js/src/jsapi-tests/testLooselyEqual.cpp b/js/src/jsapi-tests/testLooselyEqual.cpp index 24a9cfbd42b..80f3eddf32f 100644 --- a/js/src/jsapi-tests/testLooselyEqual.cpp +++ b/js/src/jsapi-tests/testLooselyEqual.cpp @@ -2,10 +2,11 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -#include "jsapi-tests/tests.h" #include #include +#include "jsapi-tests/tests.h" + using namespace std; struct LooseEqualityFixture : public JSAPITest diff --git a/js/src/jsapi-tests/testNewObject.cpp b/js/src/jsapi-tests/testNewObject.cpp index cfbe980fc8d..811b3674bd4 100644 --- a/js/src/jsapi-tests/testNewObject.cpp +++ b/js/src/jsapi-tests/testNewObject.cpp @@ -5,11 +5,10 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +#include "jsfriendapi.h" #include "jsapi-tests/tests.h" -#include "jsfriendapi.h" - const size_t N = 1000; static jsval argv[N]; diff --git a/js/src/jsapi-tests/testOOM.cpp b/js/src/jsapi-tests/testOOM.cpp index 9f4af14a70b..507ce4f4c6f 100644 --- a/js/src/jsapi-tests/testOOM.cpp +++ b/js/src/jsapi-tests/testOOM.cpp @@ -2,10 +2,10 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -#include "jsapi-tests/tests.h" - #include "mozilla/DebugOnly.h" +#include "jsapi-tests/tests.h" + BEGIN_TEST(testOOM) { JS::RootedString jsstr(cx, JS_ValueToString(cx, INT_TO_JSVAL(9))); diff --git a/js/src/jsapi-tests/testOps.cpp b/js/src/jsapi-tests/testOps.cpp index 0a4e82d4969..714a40dc40b 100644 --- a/js/src/jsapi-tests/testOps.cpp +++ b/js/src/jsapi-tests/testOps.cpp @@ -7,7 +7,6 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - #include "jsapi-tests/tests.h" static JSBool diff --git a/js/src/jsapi-tests/testOriginPrincipals.cpp b/js/src/jsapi-tests/testOriginPrincipals.cpp index 2f7648f037e..67c00caf955 100644 --- a/js/src/jsapi-tests/testOriginPrincipals.cpp +++ b/js/src/jsapi-tests/testOriginPrincipals.cpp @@ -2,9 +2,10 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -#include "jsapi-tests/tests.h" #include "jsdbgapi.h" +#include "jsapi-tests/tests.h" + JSPrincipals *sOriginPrincipalsInErrorReporter = NULL; static void diff --git a/js/src/jsapi-tests/testParseJSON.cpp b/js/src/jsapi-tests/testParseJSON.cpp index 2f1b71a9b31..d4867dae730 100644 --- a/js/src/jsapi-tests/testParseJSON.cpp +++ b/js/src/jsapi-tests/testParseJSON.cpp @@ -5,12 +5,12 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - #include #include -#include "jsapi-tests/tests.h" #include "jsstr.h" + +#include "jsapi-tests/tests.h" #include "vm/String.h" using namespace js; diff --git a/js/src/jsapi-tests/testProfileStrings.cpp b/js/src/jsapi-tests/testProfileStrings.cpp index e6833acf102..1befc761a7f 100644 --- a/js/src/jsapi-tests/testProfileStrings.cpp +++ b/js/src/jsapi-tests/testProfileStrings.cpp @@ -7,11 +7,10 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +#include "jscntxt.h" #include "jsapi-tests/tests.h" -#include "jscntxt.h" - static js::ProfileEntry pstack[10]; static uint32_t psize = 0; static uint32_t max_stack = 0; diff --git a/js/src/jsapi-tests/testPropCache.cpp b/js/src/jsapi-tests/testPropCache.cpp index f9f256c405f..90205bbad91 100644 --- a/js/src/jsapi-tests/testPropCache.cpp +++ b/js/src/jsapi-tests/testPropCache.cpp @@ -5,7 +5,6 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - #include "jsapi-tests/tests.h" static int g_counter; diff --git a/js/src/jsapi-tests/testRegExpInstanceProperties.cpp b/js/src/jsapi-tests/testRegExpInstanceProperties.cpp index de0a61c3ce0..23777f98933 100644 --- a/js/src/jsapi-tests/testRegExpInstanceProperties.cpp +++ b/js/src/jsapi-tests/testRegExpInstanceProperties.cpp @@ -5,12 +5,10 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -#include "jsapi-tests/tests.h" - #include "jscompartment.h" #include "jsgc.h" +#include "jsapi-tests/tests.h" #include "vm/Shape.h" #include "vm/Shape-inl.h" diff --git a/js/src/jsapi-tests/testResolveRecursion.cpp b/js/src/jsapi-tests/testResolveRecursion.cpp index eb4ec16f2f4..92e1541f5a1 100644 --- a/js/src/jsapi-tests/testResolveRecursion.cpp +++ b/js/src/jsapi-tests/testResolveRecursion.cpp @@ -5,7 +5,6 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - #include "jsapi-tests/tests.h" /* diff --git a/js/src/jsapi-tests/testSameValue.cpp b/js/src/jsapi-tests/testSameValue.cpp index d5205716ed5..5a00ff0400e 100644 --- a/js/src/jsapi-tests/testSameValue.cpp +++ b/js/src/jsapi-tests/testSameValue.cpp @@ -5,7 +5,6 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - #include "jsapi-tests/tests.h" BEGIN_TEST(testSameValue) diff --git a/js/src/jsapi-tests/testScriptInfo.cpp b/js/src/jsapi-tests/testScriptInfo.cpp index c886904d4b9..d0bf92ec14d 100644 --- a/js/src/jsapi-tests/testScriptInfo.cpp +++ b/js/src/jsapi-tests/testScriptInfo.cpp @@ -5,9 +5,9 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +#include "jsdbgapi.h" #include "jsapi-tests/tests.h" -#include "jsdbgapi.h" const char code[] = "xx = 1; \n\ diff --git a/js/src/jsapi-tests/testScriptObject.cpp b/js/src/jsapi-tests/testScriptObject.cpp index a9fb34753d1..6629bda0f35 100644 --- a/js/src/jsapi-tests/testScriptObject.cpp +++ b/js/src/jsapi-tests/testScriptObject.cpp @@ -5,7 +5,6 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - #include "jsapi-tests/tests.h" struct ScriptObjectFixture : public JSAPITest { diff --git a/js/src/jsapi-tests/testSetProperty.cpp b/js/src/jsapi-tests/testSetProperty.cpp index 0490ec63e06..b0f3636941a 100644 --- a/js/src/jsapi-tests/testSetProperty.cpp +++ b/js/src/jsapi-tests/testSetProperty.cpp @@ -5,7 +5,6 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - #include "jsapi-tests/tests.h" static JSBool diff --git a/js/src/jsapi-tests/testSourcePolicy.cpp b/js/src/jsapi-tests/testSourcePolicy.cpp index beace3d55df..18a441b8e6b 100644 --- a/js/src/jsapi-tests/testSourcePolicy.cpp +++ b/js/src/jsapi-tests/testSourcePolicy.cpp @@ -2,9 +2,10 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -#include "jsapi-tests/tests.h" #include "jsscript.h" +#include "jsapi-tests/tests.h" + BEGIN_TEST(testBug795104) { JS::CompileOptions opts(cx); diff --git a/js/src/jsapi-tests/testStringBuffer.cpp b/js/src/jsapi-tests/testStringBuffer.cpp index 05b95d67de8..b506a4cc9e0 100644 --- a/js/src/jsapi-tests/testStringBuffer.cpp +++ b/js/src/jsapi-tests/testStringBuffer.cpp @@ -5,11 +5,9 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -#include "jsapi-tests/tests.h" - #include "jsatom.h" +#include "jsapi-tests/tests.h" #include "vm/StringBuffer.h" BEGIN_TEST(testStringBuffer_finishString) diff --git a/js/src/jsapi-tests/testToIntWidth.cpp b/js/src/jsapi-tests/testToIntWidth.cpp index 404157b2be3..6c315c05dbb 100644 --- a/js/src/jsapi-tests/testToIntWidth.cpp +++ b/js/src/jsapi-tests/testToIntWidth.cpp @@ -5,11 +5,9 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -#include "jsapi-tests/tests.h" - #include +#include "jsapi-tests/tests.h" #include "vm/NumericConversions.h" using js::detail::ToIntWidth; diff --git a/js/src/jsapi-tests/testTrap.cpp b/js/src/jsapi-tests/testTrap.cpp index 7bec0ec54f8..d10329bede0 100644 --- a/js/src/jsapi-tests/testTrap.cpp +++ b/js/src/jsapi-tests/testTrap.cpp @@ -5,9 +5,9 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +#include "jsdbgapi.h" #include "jsapi-tests/tests.h" -#include "jsdbgapi.h" static int emptyTrapCallCount = 0; diff --git a/js/src/jsapi-tests/testTypedArrays.cpp b/js/src/jsapi-tests/testTypedArrays.cpp index 196e25ae4cc..f48858589e8 100644 --- a/js/src/jsapi-tests/testTypedArrays.cpp +++ b/js/src/jsapi-tests/testTypedArrays.cpp @@ -5,9 +5,9 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +#include "jsfriendapi.h" #include "jsapi-tests/tests.h" -#include "jsfriendapi.h" using namespace js; diff --git a/js/src/jsapi-tests/testUTF8.cpp b/js/src/jsapi-tests/testUTF8.cpp index b6dee4a34a5..cea6055135d 100644 --- a/js/src/jsapi-tests/testUTF8.cpp +++ b/js/src/jsapi-tests/testUTF8.cpp @@ -5,10 +5,11 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -#include "jsapi-tests/tests.h" #include "jsapi.h" #include "jsstr.h" + #include "js/CharacterEncoding.h" +#include "jsapi-tests/tests.h" BEGIN_TEST(testUTF8_badUTF8) { diff --git a/js/src/jsapi-tests/testXDR.cpp b/js/src/jsapi-tests/testXDR.cpp index d493c4a292a..7ca51011618 100644 --- a/js/src/jsapi-tests/testXDR.cpp +++ b/js/src/jsapi-tests/testXDR.cpp @@ -4,10 +4,11 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -#include "jsapi-tests/tests.h" +#include "jsfriendapi.h" #include "jsscript.h" #include "jsstr.h" -#include "jsfriendapi.h" + +#include "jsapi-tests/tests.h" #include "jsscriptinlines.h" diff --git a/js/src/jsapi-tests/tests.cpp b/js/src/jsapi-tests/tests.cpp index a6aa764d889..30e2444288d 100644 --- a/js/src/jsapi-tests/tests.cpp +++ b/js/src/jsapi-tests/tests.cpp @@ -5,10 +5,13 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "jsapi-tests/tests.h" -#include "js/RootingAPI.h" -#include "jsobj.h" + #include +#include "jsobj.h" + +#include "js/RootingAPI.h" + JSAPITest *JSAPITest::list; bool JSAPITest::init() diff --git a/js/src/jsapi-tests/tests.h b/js/src/jsapi-tests/tests.h index 8b6d0db4a5a..493c50a58d6 100644 --- a/js/src/jsapi-tests/tests.h +++ b/js/src/jsapi-tests/tests.h @@ -9,20 +9,18 @@ #include "mozilla/Util.h" -#include "jsapi.h" -#include "jscntxt.h" -#include "jsprvtd.h" -#include "jsalloc.h" - -// For js::gc::AutoSuppressGC -#include "jsgc.h" - -#include "js/Vector.h" - #include -#include #include #include +#include + +#include "jsalloc.h" +#include "jsapi.h" +#include "jscntxt.h" +#include "jsgc.h" +#include "jsprvtd.h" + +#include "js/Vector.h" /* Note: Aborts on OOM. */ class JSAPITestString {