Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding support for Consistency Assertions #282

Merged
merged 21 commits into from
Jan 9, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Updated test patterns
  • Loading branch information
sidprasad committed Jan 8, 2025
commit dfeee5ff70a11f9dbb32cf732a03f3522076f6f7
4 changes: 2 additions & 2 deletions forge/lang/expander.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -1077,7 +1077,7 @@
(define-syntax (SatisfiabilityDecl stx)
(syntax-parse stx
[sd:SatisfiabilityDeclClass
#:with test_name (format-id stx "~a_Assertion_~a" #'sd.expected (make-temporary-name stx))
#:with test_name (format-id stx "~a_assertion_~a" #'sd.expected (make-temporary-name stx))
(syntax/loc stx
(test
test_name
Expand All @@ -1089,7 +1089,7 @@
(define-syntax (ConsistencyDecl stx)
(syntax-parse stx
[cd:ConsistencyDeclClass
#:with test_name (format-id stx "Assert_~a_~a_~a" #'cd.consistency #'cd.pred-name (make-temporary-name stx))
#:with test_name (format-id stx "~a_assertion_for_~a_~a" #'cd.consistency #'cd.pred-name (make-temporary-name stx))
#:with conj_total (syntax/loc stx (&& cd.test-expr cd.pred-name))
(syntax/loc stx
(test
Expand Down
16 changes: 7 additions & 9 deletions forge/tests/error/main.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -156,15 +156,13 @@
;;; ? after * makes the match lazy, meaning it will match as few characters as possible while still allowing the remainder of the regular expression to match.


;;;; TODO: Change these patterns!
(list "multiple_test_failures.frg" #rx".*?Assertion_All_isRoot_is_necessary_for_isNotRoot failed.*?Invalid example 'thisIsNotATree'.*?Test t1 failed")
(list "properties_undirected_tree_underconstraint_multiple_errors.frg" #rx".*?necessary_assertion_for_isUndirectedTree_.*? failed.*?quantified_necessary_assertion_for_isUndirectedTree.*?failed")
(list "properties_undirected_tree_overconstraint_error.frg" #rx"Assertion_isUndirected_is_sufficient_for_isUndirectedTree failed.")
(list "properties_directed_tree_sufficiency_error.frg" #rx"Assertion_All_arethesame_is_sufficient_for_bothRoots failed.")
(list "consistency-error.frg" #rx"Failed test Assert_consistent_q_")
(list "inconsistency-error.frg" #rx"Failed test Assert_inconsistent_q_")
(list "properties_directed_tree_necessity_error.frg" #rx"Assertion_All_isRoot_is_necessary_for_isNotRoot failed.")

(list "multiple_test_failures.frg" #rx".*?quantified_necessary_assertion_for_isNotRoot.*? failed.*?Invalid example 'thisIsNotATree'.*?Test t1 failed")
(list "properties_undirected_tree_underconstraint_multiple_errors.frg" #rx".*?necessary_assertion_for_isUndirectedTree.*? failed.*?quantified_necessary_assertion_for_isUndirectedTree.*?failed")
(list "properties_undirected_tree_overconstraint_error.frg" #rx"sufficient_assertion_for_isUndirectedTree.*?failed.")
(list "properties_directed_tree_sufficiency_error.frg" #rx".*?quantified_sufficient_assertion_for_bothRoots.*?failed.")
(list "consistency-error.frg" #rx"Failed test consistent_assertion_for_q_")
(list "inconsistency-error.frg" #rx"Failed test inconsistent_assertion_for_q_")
(list "properties_directed_tree_necessity_error.frg" #rx".*?quantified_necessary_assertion_for_isNotRoot.*?failed.")


(list "formula_comprehension_cardinality.frg" #rx"expected to be given")
Expand Down
Loading