diff options
author | wisberg <wisberg> | 2002-12-16 18:51:06 +0000 |
---|---|---|
committer | wisberg <wisberg> | 2002-12-16 18:51:06 +0000 |
commit | 144143c2970a1e874d74cdbd0f8c622d4282a3c3 (patch) | |
tree | b12383d3d9e76c7e1f25f7fbec83051ef17f81fb /tests/new/StrictFpCompile.java | |
parent | fafae443719b26159ab2d7dac1c9b46b5e00b671 (diff) | |
download | aspectj-144143c2970a1e874d74cdbd0f8c622d4282a3c3.tar.gz aspectj-144143c2970a1e874d74cdbd0f8c622d4282a3c3.zip |
initial version
Diffstat (limited to 'tests/new/StrictFpCompile.java')
-rw-r--r-- | tests/new/StrictFpCompile.java | 82 |
1 files changed, 82 insertions, 0 deletions
diff --git a/tests/new/StrictFpCompile.java b/tests/new/StrictFpCompile.java new file mode 100644 index 000000000..2efe0c9d8 --- /dev/null +++ b/tests/new/StrictFpCompile.java @@ -0,0 +1,82 @@ +import org.aspectj.testing.*; + +public strictfp class StrictFpCompile { + public static void main(String[] args) { + new StrictFpCompile().go(); + Tester.check(ran, "go did not run"); + } + + static boolean ran = false; + + void go() { + ran = true; + } +} + + +// Ok, must be generated with strictfp modifier +strictfp interface StrictInterface { + // Has to be error, may not generate strictfp, but has to set strictfp in bytecode + // strictfp float test1(); + + // Ok, may not be generated with strictfp modifier + float test2(); +}; + +// Ok, must be generated with strictfp modifier +strictfp abstract class StrictClass { + // Has to be an error + // strictfp float f; + + // Ok + double d; + + // Has to be error, may not generate strictfp, but has to set strictfp in bytecode + // strictfp StrictClass() {} + + // Ok, must not generate strictfp, but has to set strictfp in bytecode + StrictClass(double _d) { d = _d; } + + // Ok, may be generated with strictfp modifier + abstract float test1(); + + // Ok, may be generated with strictfp modifier + float test2() { return 0.f; } + + // Ok, may be generated with strictfp modifier + strictfp float test3() { return 0.f; } + + // Ok, may be generated with strictfp modifier + strictfp static float test4() { return 0.f; } + +}; + +// Ok, may not be generated with strictfp modifier +class NonStrictClass { + // Ok + NonStrictClass() {} + + // Ok, may not be generated with strictfp modifier + float test2() { return 0.f; } + + // Ok, must be generated with strictfp modifier + strictfp float test3() { return 0.f; } + + // Ok, must be generated with strictfp modifier + strictfp static float test4() { return 0.f; } + +}; + +// Ok +strictfp class OuterStrictClass { + + // Ok, may be generated with strictfp modifier + class InnerStrictClass { + + // Ok, may be generated with strictfp modifier + class InnerInnerClass { + } + } + +}; + |