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

testament: error instead of silently overwrite a spec #16166

Merged
merged 8 commits into from
Nov 29, 2020

Conversation

timotheecour
Copy link
Member

@timotheecour timotheecour commented Nov 28, 2020

followup #15930
refs https://github.com/nim-lang/Nim/pull/15930/files#r531796278 /cc @xflywind

before PR, lots of tests were wrong (in the sense they assumed some things were being tested but they were in fact not being tested because testament spec was overwriting the fields written more than once)

after PR: this is fixed and overwriting would result in errors

future work

make nimout comparison use nimoutCheck instead of:

elif expected.nimout.len > 0 and expected.nimout.normalizeMsg notin given.nimout.normalizeMsg:

and then use

nimout: '''
tcaseexpr1.nim(33, 10) Error: not all cases are covered2; missing: {C}
tcaseexpr1.nim(39, 12) Error: type mismatch: got <string> but expected 'int literal(10)'
'''

in tests/casestmt/tcaseexpr1.nim

CI failure unrelated: #16169

@timotheecour timotheecour marked this pull request as ready for review November 28, 2020 08:02
Copy link
Member

@ringabout ringabout left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me

@timotheecour
Copy link
Member Author

@Araq I'm merging this

@timotheecour timotheecour merged commit 6114df3 into nim-lang:devel Nov 29, 2020
@timotheecour timotheecour deleted the pr_fix_outputsub branch November 29, 2020 18:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants