Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
stdpp
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Monitor
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Iris
stdpp
Commits
8daabbfc
Commit
8daabbfc
authored
3 years ago
by
Robbert Krebbers
Browse files
Options
Downloads
Patches
Plain Diff
Add pretty printing tests for multiset literals.
parent
f6f3b9c6
No related branches found
No related tags found
1 merge request
!253
Fix pretty printing of multset literals + add tests
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
tests/notation.ref
+9
-0
9 additions, 0 deletions
tests/notation.ref
tests/notation.v
+15
-1
15 additions, 1 deletion
tests/notation.v
with
24 additions
and
1 deletion
tests/notation.ref
+
9
−
0
View file @
8daabbfc
...
...
@@ -24,3 +24,12 @@ test_op_4 =
4 := {[4 := [4]]};
5 := {[5 := [5]]}]}
: M (M (list nat))
test_gmultiset_1 = {[+ 10 +]}
: gmultiset nat
test_gmultiset_2 = {[+ 10; 11 +]}
: gmultiset nat
test_gmultiset_3 = {[+ 10; 11; 2 - 2 +]}
: gmultiset nat
test_gmultiset_4 =
{[+ {[+ 10 +]}; ∅; {[+ 2 - 2; 10 +]} +]}
: gmultiset (gmultiset nat)
This diff is collapsed.
Click to expand it.
tests/notation.v
+
15
−
1
View file @
8daabbfc
From
stdpp
Require
Import
base
tactics
fin_maps
.
From
stdpp
Require
Import
base
tactics
fin_maps
gmultiset
.
(** Test parsing of variants of [(≡)] notation. *)
Lemma
test_equiv_annot_sections
`{
!
Equiv
A
,
!
Equivalence
(
≡@
{
A
})}
(
x
:
A
)
:
...
...
@@ -35,3 +35,17 @@ Section map_notations.
Print
test_op_3
.
Print
test_op_4
.
End
map_notations
.
(** Test that notations for maps with multiple elements can be parsed and printed correctly. *)
Section
multiset_notations
.
Definition
test_gmultiset_1
:
gmultiset
nat
:=
{[
+
10
+
]}
.
Definition
test_gmultiset_2
:
gmultiset
nat
:=
{[
+
10
;
11
+
]}
.
Definition
test_gmultiset_3
:
gmultiset
nat
:=
{[
+
10
;
11
;
2
-
2
+
]}
.
Definition
test_gmultiset_4
:
gmultiset
(
gmultiset
nat
)
:=
{[
+
{[
+
10
+
]};
∅
;
{[
+
2
-
2
;
10
+
]}
+
]}
.
Print
test_gmultiset_1
.
Print
test_gmultiset_2
.
Print
test_gmultiset_3
.
Print
test_gmultiset_4
.
End
multiset_notations
.
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment