diff options
author | Michael Lowell Roberts <mirobert@microsoft.com> | 2015-07-08 11:01:11 -0700 |
---|---|---|
committer | Michael Lowell Roberts <mirobert@microsoft.com> | 2015-07-08 11:01:11 -0700 |
commit | fad74b96e5d9367960358b1c4cc9c2cce79e961a (patch) | |
tree | 805771f13c38cc2206ee9f6d6226651db5b61573 /Test/irondafny0/inheritreqs1.dfy | |
parent | 85d4456ccf1e1d8c456dffa012d3f3d724f50a4a (diff) |
added unit tests for exclusive refinement.
Diffstat (limited to 'Test/irondafny0/inheritreqs1.dfy')
-rw-r--r-- | Test/irondafny0/inheritreqs1.dfy | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/Test/irondafny0/inheritreqs1.dfy b/Test/irondafny0/inheritreqs1.dfy new file mode 100644 index 00000000..c83d04ac --- /dev/null +++ b/Test/irondafny0/inheritreqs1.dfy @@ -0,0 +1,22 @@ +// RUN: %dafny /compile:3 /optimize /print:"%t.print" /dprint:"%t.dprint" "%s" > "%t"
+// RUN: %diff "%s.expect" "%t"
+
+abstract module Spec {
+ method Greet(b: bool)
+ requires b;
+}
+
+module Impl refines Spec {
+ method Greet(b: bool) {
+ print "o hai!\n";
+ }
+
+ method Xyzzy(b: bool)
+ requires b;
+ {}
+
+ method Main() {
+ Greet(true);
+ Xyzzy(false);
+ }
+}
|