aboutsummaryrefslogtreecommitdiffstats
path: root/tests/new/volatileKeyword/Driver.java
diff options
context:
space:
mode:
Diffstat (limited to 'tests/new/volatileKeyword/Driver.java')
-rw-r--r--tests/new/volatileKeyword/Driver.java15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/new/volatileKeyword/Driver.java b/tests/new/volatileKeyword/Driver.java
new file mode 100644
index 000000000..acac776d1
--- /dev/null
+++ b/tests/new/volatileKeyword/Driver.java
@@ -0,0 +1,15 @@
+
+import org.aspectj.testing.Tester;
+
+public class Driver {
+ volatile static boolean completed = true;
+ public static void main(String[] args) { test(); }
+ public static void test() {
+ Tester.check(completed, "static volatile filed");
+ Tester.check(new C().completed, "instance of volatile filed");
+ }
+}
+
+class C {
+ volatile boolean completed = true;
+} \ No newline at end of file