js/src/tests/style/BadIncludesOrder-inl.h

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/js/src/tests/style/BadIncludesOrder-inl.h	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,30 @@
     1.4 +// Note: Each #if scope gets checked separately.
     1.5 +
     1.6 +// These are in reverse order!
     1.7 +#if A
     1.8 +# include "vm/Interpreter-inl.h"
     1.9 +# include "jsscriptinlines.h"
    1.10 +# include "js/Value.h"
    1.11 +# include "ds/LifoAlloc.h"
    1.12 +# include "jsapi.h"
    1.13 +# include <stdio.h>
    1.14 +# include "mozilla/HashFunctions.h"
    1.15 +#endif
    1.16 +
    1.17 +// These are in reverse order, but it's ok due to the #if scopes.
    1.18 +#if B
    1.19 +# include "vm/Interpreter-inl.h"
    1.20 +# if C
    1.21 +#  include "js/Value.h"
    1.22 +#  if D
    1.23 +#   include "jsapi.h"
    1.24 +#  endif
    1.25 +#  include <stdio.h>
    1.26 +# endif
    1.27 +# include "mozilla/HashFunctions.h"
    1.28 +#endif
    1.29 +
    1.30 +#include "jsobj.h"
    1.31 +#include "jsfun.h"      // out of order
    1.32 +#include "jsscript.h"
    1.33 +#include "jstypes.h"

mercurial