diff options
Diffstat (limited to 'js/src/tests/style')
-rw-r--r-- | js/src/tests/style/BadIncludes.h | 11 | ||||
-rw-r--r-- | js/src/tests/style/BadIncludes2-inl.h | 1 | ||||
-rw-r--r-- | js/src/tests/style/BadIncludes2.h | 1 | ||||
-rw-r--r-- | js/src/tests/style/BadIncludesOrder-inl.h | 30 | ||||
-rw-r--r-- | js/src/tests/style/HeaderCycleA1.h | 1 | ||||
-rw-r--r-- | js/src/tests/style/HeaderCycleA2.h | 1 | ||||
-rw-r--r-- | js/src/tests/style/HeaderCycleA3.h | 1 | ||||
-rw-r--r-- | js/src/tests/style/HeaderCycleB1-inl.h | 1 | ||||
-rw-r--r-- | js/src/tests/style/HeaderCycleB2-inl.h | 2 | ||||
-rw-r--r-- | js/src/tests/style/HeaderCycleB3-inl.h | 1 | ||||
-rw-r--r-- | js/src/tests/style/HeaderCycleB4-inl.h | 2 | ||||
-rw-r--r-- | js/src/tests/style/jsheadercycleB5inlines.h | 1 |
12 files changed, 53 insertions, 0 deletions
diff --git a/js/src/tests/style/BadIncludes.h b/js/src/tests/style/BadIncludes.h new file mode 100644 index 000000000..8db124d0e --- /dev/null +++ b/js/src/tests/style/BadIncludes.h @@ -0,0 +1,11 @@ +// Note: the #if/#elif conditions are to get past the #include order checking. +#if A +#include "tests/style/BadIncludes.h" // bad: self-include +#include "tests/style/BadIncludes2.h" // ok +#elif B +#include "BadIncludes2.h" // bad: not a full path +#elif C +#include <tests/style/BadIncludes2.h> // bad: <> form used for local file +#elif D +#include "stdio.h" // bad: "" form used for system file +#endif diff --git a/js/src/tests/style/BadIncludes2-inl.h b/js/src/tests/style/BadIncludes2-inl.h new file mode 100644 index 000000000..bc4f7729b --- /dev/null +++ b/js/src/tests/style/BadIncludes2-inl.h @@ -0,0 +1 @@ +// (this file is deliberately empty) diff --git a/js/src/tests/style/BadIncludes2.h b/js/src/tests/style/BadIncludes2.h new file mode 100644 index 000000000..1623c1ddc --- /dev/null +++ b/js/src/tests/style/BadIncludes2.h @@ -0,0 +1 @@ +#include "tests/style/BadIncludes2-inl.h" // bad: vanilla header #includes an inline-header diff --git a/js/src/tests/style/BadIncludesOrder-inl.h b/js/src/tests/style/BadIncludesOrder-inl.h new file mode 100644 index 000000000..865c84568 --- /dev/null +++ b/js/src/tests/style/BadIncludesOrder-inl.h @@ -0,0 +1,30 @@ +// Note: Each #if scope gets checked separately. + +// These are in reverse order! +#if A +# include "vm/Interpreter-inl.h" +# include "jsscriptinlines.h" +# include "js/Value.h" +# include "ds/LifoAlloc.h" +# include "jsapi.h" +# include <stdio.h> +# include "mozilla/HashFunctions.h" +#endif + +// These are in reverse order, but it's ok due to the #if scopes. +#if B +# include "vm/Interpreter-inl.h" +# if C +# include "js/Value.h" +# if D +# include "jsapi.h" +# endif +# include <stdio.h> +# endif +# include "mozilla/HashFunctions.h" +#endif + +#include "jsobj.h" +#include "jsfun.h" // out of order +#include "jsscript.h" +#include "jstypes.h" diff --git a/js/src/tests/style/HeaderCycleA1.h b/js/src/tests/style/HeaderCycleA1.h new file mode 100644 index 000000000..d70e08f01 --- /dev/null +++ b/js/src/tests/style/HeaderCycleA1.h @@ -0,0 +1 @@ +#include "tests/style/HeaderCycleA2.h" diff --git a/js/src/tests/style/HeaderCycleA2.h b/js/src/tests/style/HeaderCycleA2.h new file mode 100644 index 000000000..d42dbe3d5 --- /dev/null +++ b/js/src/tests/style/HeaderCycleA2.h @@ -0,0 +1 @@ +#include "tests/style/HeaderCycleA3.h" diff --git a/js/src/tests/style/HeaderCycleA3.h b/js/src/tests/style/HeaderCycleA3.h new file mode 100644 index 000000000..01a72ecd8 --- /dev/null +++ b/js/src/tests/style/HeaderCycleA3.h @@ -0,0 +1 @@ +#include "tests/style/HeaderCycleA1.h" diff --git a/js/src/tests/style/HeaderCycleB1-inl.h b/js/src/tests/style/HeaderCycleB1-inl.h new file mode 100644 index 000000000..f89dc8530 --- /dev/null +++ b/js/src/tests/style/HeaderCycleB1-inl.h @@ -0,0 +1 @@ +#include "tests/style/HeaderCycleB2-inl.h" diff --git a/js/src/tests/style/HeaderCycleB2-inl.h b/js/src/tests/style/HeaderCycleB2-inl.h new file mode 100644 index 000000000..4ba083047 --- /dev/null +++ b/js/src/tests/style/HeaderCycleB2-inl.h @@ -0,0 +1,2 @@ +#include "tests/style/HeaderCycleB3-inl.h" +#include "tests/style/HeaderCycleB4-inl.h" diff --git a/js/src/tests/style/HeaderCycleB3-inl.h b/js/src/tests/style/HeaderCycleB3-inl.h new file mode 100644 index 000000000..9963b460c --- /dev/null +++ b/js/src/tests/style/HeaderCycleB3-inl.h @@ -0,0 +1 @@ +#include "tests/style/HeaderCycleB4-inl.h" diff --git a/js/src/tests/style/HeaderCycleB4-inl.h b/js/src/tests/style/HeaderCycleB4-inl.h new file mode 100644 index 000000000..23324c676 --- /dev/null +++ b/js/src/tests/style/HeaderCycleB4-inl.h @@ -0,0 +1,2 @@ +#include "tests/style/jsheadercycleB5inlines.h" +#include "tests/style/HeaderCycleB1-inl.h" diff --git a/js/src/tests/style/jsheadercycleB5inlines.h b/js/src/tests/style/jsheadercycleB5inlines.h new file mode 100644 index 000000000..92a54cf53 --- /dev/null +++ b/js/src/tests/style/jsheadercycleB5inlines.h @@ -0,0 +1 @@ +#include "tests/style/HeaderCycleB1-inl.h" |