Skip to content
Snippets Groups Projects
Verified Commit 00166237 authored by Tej Chajed's avatar Tej Chajed
Browse files

Add tests for wp_load and wp_store failures

parent 4c96a504
No related branches found
No related tags found
No related merge requests found
...@@ -68,6 +68,26 @@ ...@@ -68,6 +68,26 @@
--------------------------------------∗ --------------------------------------∗
|={⊤}=> l ↦ #1 |={⊤}=> l ↦ #1
"wp_load_fail"
: string
The command has indeed failed with message:
Tactic failure: wp_load: cannot find 'Load' in (Fork Skip).
The command has indeed failed with message:
Tactic failure: wp_load: cannot find 'Load' in (Fork Skip).
"wp_load_no_ptsto"
: string
The command has indeed failed with message:
Tactic failure: wp_load: cannot find l ↦ ?.
"wp_store_fail"
: string
The command has indeed failed with message:
Tactic failure: wp_store: cannot find 'Store' in (Fork Skip).
The command has indeed failed with message:
Tactic failure: wp_store: cannot find 'Store' in (Fork Skip).
"wp_store_no_ptsto"
: string
The command has indeed failed with message:
Tactic failure: wp_store: cannot find l ↦ ?.
1 goal 1 goal
Σ : gFunctors Σ : gFunctors
......
...@@ -149,6 +149,30 @@ Section tests. ...@@ -149,6 +149,30 @@ Section tests.
WP e + #0 [{ _, True }]. WP e + #0 [{ _, True }].
Proof. wp_bind (e + #0)%E. Abort. Proof. wp_bind (e + #0)%E. Abort.
Check "wp_load_fail".
Lemma wp_load_fail :
WP Fork Skip {{ _, True }}.
Proof. Fail wp_load. Abort.
Lemma wp_load_fail :
WP Fork Skip [{ _, True }].
Proof. Fail wp_load. Abort.
Check "wp_load_no_ptsto".
Lemma wp_load_fail (l: loc) :
WP ! #l {{ _, True }}.
Proof. Fail wp_load. Abort.
Check "wp_store_fail".
Lemma wp_store_fail :
WP Fork Skip {{ _, True }}.
Proof. Fail wp_store. Abort.
Lemma wp_store_fail :
WP Fork Skip [{ _, True }].
Proof. Fail wp_store. Abort.
Check "wp_store_no_ptsto".
Lemma wp_store_fail (l: loc) :
WP #l <- #0 {{ _, True }}.
Proof. Fail wp_store. Abort.
Lemma wp_apply_evar e P : Lemma wp_apply_evar e P :
P -∗ ( Q Φ, Q -∗ WP e {{ Φ }}) -∗ WP e {{ _, True }}. P -∗ ( Q Φ, Q -∗ WP e {{ Φ }}) -∗ WP e {{ _, True }}.
Proof. iIntros "HP HW". wp_apply "HW". iExact "HP". Qed. Proof. iIntros "HP HW". wp_apply "HW". iExact "HP". Qed.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment