-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Neg tests: remove xerror parameter from neg tests (#1110) #1122
Conversation
(implicit defaultOptions: List[String]): Unit = { | ||
val allArgs = args ++ defaultOptions | ||
val processor = if (allArgs.exists(_.startsWith("#"))) Bench else Main | ||
val reporter = processor.process(allArgs) | ||
|
||
val nerrors = reporter.errorCount | ||
val xerrors = (expectedErrorsPerFile map {_.totalErrors}).sum | ||
if (negTest) | ||
assert((negTest && xerrors > 0), s"No errors found in neg test") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this if is strange
Update: now we don't need negTest flag anymore; neg tests are binded to neg dir (changes are added in dotty-staging@de7e377) |
if (!generatePartestFiles || !partestableDir(prefix, dirName, args ++ defaultOptions, xerrors)) { | ||
if (runTest) | ||
log(s"WARNING: run tests can only be run by partest, JUnit just verifies compilation: $prefix$dirName") | ||
val computeFilePathsAndExpErrors = { () => |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see no reason why this should be a val
. Make it a def
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in last commit
Otherwise LGTM |
Neg tests: remove xerror parameter from neg tests (#1110)
Neg tests at the moment take expected number of errors as an argument. Since #1106 we can optionally mark lines where errors are expected.
With this change we don't need to pass the expected number of errors as an argument to neg tests anymore. In addition most of the neg files don't require separate test (except for files that should use specific arguments for compilation or directories that should be compiled inside
neg
dir):New subfolders in neg dir:
compExceptions
- contains tests that result in exception during the compilation (currently only structural.scala);customArgs
- contains neg tests that should be compiled with specific arguments;Several files were in neg dir but were not added to
tests.scala
as tests. Now they became a part of neg_all test:Several files that were in neg dir have no compilation errors. Now they are moved to pos tests:
Related issue: #1110
Review by @DarkDimius