summaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
...
| * | SI-9760 Fix for higher-kinded GADT refinementMiles Sabin2016-08-151-0/+18
| |/
* | Merge pull request #5348 from som-snytt/issue/9841-test-2.11Adriaan Moors2016-10-181-0/+24
|\ \ | | | | | | SI-9841 Regression test for init SO
| * | SI-9841 Regression test for init SOSom Snytt2016-08-241-0/+24
| |/ | | | | | | Verifies example behavior in ticket.
* | Merge pull request #5218 from retronym/ticket/9806Jason Zaugg2016-10-181-0/+18
|\ \ | |/ |/| SI-9806 Fix incorrect codegen with optimizer, constants, try/catch
| * SI-9806 Fix incorrect codegen with optimizer, constants, try/catchJason Zaugg2016-06-071-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The constant optimizer phase performs abstract interpretation of the icode representation of the progam in order to eliminate dead code. For each basic block, the possible and impossible states of each local variable is computed for both a normal and an exceptional exit. A bug in this code incorrectly tracked state for exception exits. This appears to have been an oversight: the new state was computed at each instruction, but it was discarded rather than folded through the intepreter.
* | Merge pull request #5236 from som-snytt/issue/triple-backportLukas Rytz2016-07-131-0/+8
|\ \ | | | | | | [nomerge] Avoid triple-quoting triple quotes
| * | Avoid triple-quoting triple quotesSom Snytt2016-06-171-0/+8
| | | | | | | | | | | | | | | | | | The boolean test for triples was inadvertently flipped. Adds test for pretty printed multiline strings
* | | Use sbt for PR validationStefan Zeiger2016-06-148-7/+37
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Support directories in `-doc-external-doc`: It is documented as accepting a “classpath_entry_path” for the keys but this only worked for JARs and not for individual class files. When checking for external-doc mappings for a Symbol, we now find the root directory relative to a class file instead of using the full class file path. The corresponding tests for SI-191 and SI8557 are also fixed to support individual class files instead of JARs in partest. This is required for the sbt build which runs partest on “quick” instead of “pack”. - Fix version and repository handling for bootstrapping. The bootstrap `scalaInstance` can now be resolved from any repository added to the project (not just the bootstrap repositories) by using a different workaround for https://github.com/sbt/sbt/issues/1872. - Workaround for https://github.com/sbt/sbt/issues/2640 (putting the wrong `scalaInstance` on partest’s classpath). The required `ScalaInstance` constructor is deprecated, so we have to disable deprecation warnings and fatal warnings until there is a better fix. - Add MiMa to the sbt build (port of the old `test.bc` ant task). The sbt-mima plugin doesn’t have all the features we need, so we do it manually in a similar way to what the plugin does. Checks are done in both directions for the `library` and `compiler` projects. The base version has to be set in `build.sbt`. When set to `None`, MiMa checks are skipped. MiMa checks are run sequentially to avoid spurious errors (see https://github.com/typesafehub/migration-manager/issues/115). - Port the OSGi tests to the sbt build. The set of JARs that gets copied into build/osgi as bundles is a bit different from the ant build. We omit the source JARs but add additional modules that are part of the Scala distribution, which seems more correct. - Get rid up `pull-binary-libs.sh` for the sbt build. Add artifacts are resolved from the special bootstrap repository through Ivy. The special `code.jar` and `instrumented.jar` artifacts are copied to the location where partest expects them (because these paths are hardcoded in partest). Other extra JARs for partest in `test/files/lib` are referenced directly from the Ivy cache. - Move common settings that should be available with unqualified names in local `.sbt` files and on the command line into an auto-plugin. - Add an `antStyle` setting to sbt to allow users to easily enable ant-style incremental compilation instead of sbt’s standard name hashing with `set antStyle := true`. - Disable verbose `info`-level logging during sbt startup for both, `validate/test` and `validate/publish-core` jobs. Update logging is no longer disabled when running locally (where it is useful and doesn’t generate excessive output). - Pass optimization flags for scalac down to partest, using the new partest version 1.0.15\6. - Call the new sbt-based PR validation from `scripts/jobs/validate/test`. - Disable the tests `run/t7843-jsr223-service` and `run/t7933` from https://github.com/scala/scala/pull/4959 for now. We need to set up a new test project (either partest or junit) that can run them on a packaged version of Scala, or possibly move them into a separate project that would naturally run from a packaged Scala as part of the community build.
* | Merge pull request #5219 from som-snytt/issue/9245Jason Zaugg2016-06-141-0/+27
|\ \ | | | | | | SI-9245 Fresher name in Try and test
| * | SI-9245 Fresher name in Try and testSom Snytt2016-06-071-0/+27
| |/ | | | | | | | | | | | | | | Fresh name for catcher gets a dollar. "Here, have a dollar." Test due to retronym demonstrates possible conflict. Over the lifetime of the universe, surely at least one code monkey would type in that identifier to catch a banana.
* / SI-9737 [no-merge] Backport stringOf ParIterableNicolas Stucki2016-06-031-0/+57
|/ | | | | | | | | | | | | | Cherry-picked c5f3d3f286ee5c26c8ddcf10f6878058e8f7e040 Edited comment: in stringOf, let GenIterable subsume both Iterable and ParIterable. This change is required for Scala.js compatibility as it does not support parallel collections. Conflicts: src/library/scala/runtime/ScalaRunTime.scala
* Merge pull request #4998 from som-snytt/issue/7898-iLukas Rytz2016-06-015-4/+35
|\ | | | | SI-7898 Read user input during REPL warmup
| * SI-7898 Label for parsing -i sourcesLukas Rytz2016-05-243-0/+34
| | | | | | | | Text-based REPL pre-parses, so use the current label for errors.
| * SI-7898 Report paste errors improvedlySom Snytt2016-05-231-1/+1
| | | | | | | | | | | | | | | | Use a "label" for errors, so that script names are shown. Position is still wrong for scripts in REPL. Initial scripts are run with `ILoop.echo` and results printing turned off, but reporter still enabled.
| * SI-7898 Read user input during REPL warmupSom Snytt2016-05-201-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The compiler is created on main thread and user input is read on an aux thread (opposite to currently). Fixes completion when `-i` is supplied. Now `-i` means pasted and new option `-I` means line-by-line. The temporary reader uses postInit to swap in the underlying reader. Completion is disabled for the temporary reader, rather than blocking while it waits for a compiler. But manically hitting tab is one way of knowing exactly when completion is live.
* | SI-9789 use quadratic probing in OpenHashMapPerformant Data LLC2016-05-264-82/+251
| | | | | | | | | | | | | | | | | | | | | | | | The original probe sequence, taken from Python's hash table code, is exponential, jumping around in the hash table with poor memory locality. This replaces the probe algorithm with the more conventional quadratic probing. This also adds tests to the benchmarking code using AnyRef keys, which have pseudorandom hash codes (unlike Ints, whose hash code is simply the Int itself). The intensity of the benchmarking is reduced to make the tests complete within 9 hours, by removing unnecessary sampling.
* | Merge pull request #4959 from rjolly/scripting15Stefan Zeiger2016-05-252-8/+4
|\ \ | | | | | | Use jarlister in build
| * | Use jarlister in buildRaphael Jolly2016-05-212-8/+4
| |/ | | | | | | | | | | | | The goal of this change is to exercize the "manifest classpath" mechanism, meant to bring the compiler its needed classes as resources, listed in jar manifests, as opposed to files, thus enabling to use the compiler in sandboxed environments (and also the scripting engine for that matter).
* | Merge pull request #5061 from performantdata/benchmark-frameworkJason Zaugg2016-05-257-0/+457
|\ \ | | | | | | JMH-based benchmark framework
| * | Enable full compiler optimizations in JMH benchmarking.Performant Data LLC2016-05-051-1/+1
| | |
| * | Address JMH benchmark reviewer's issues.Performant Data LLC2016-05-033-59/+61
| | | | | | | | | | | | | | | Besides tweaks to the documentation, this tests smaller (25-element) maps, and rewrites OpenHashMapRunner in more idiomatic Scala.
| * | Improve the OpenHashMapBenchmark run times.Performant Data LLC2016-05-031-7/+14
| | | | | | | | | | | | | | | For the warm-up invocations, suppress setup and teardown that is only needed for the measurement iterations. Reduce the number of forks.
| * | Add a JMH runner class to the library benchmark framework.Performant Data LLC2016-05-033-9/+167
| | |
| * | Benchmark the OpenHashMap memory usage.Performant Data LLC2016-05-034-11/+35
| | | | | | | | | | | | Also add sbteclipse to the benchmark project.
| * | Add get() tests to OpenHashMap, reduce timing artifacts.Performant Data LLC2016-05-031-35/+144
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In order to get a better exploration of the variance of tests in a limited time, I've reduced the number of measurement iterations and increased the number of forks. By sight, the measurement iterations seemed pretty consistent within a trial, whereas they would vary widely on occasional forks. I extended testing down to 50-entry maps, to explore the rise in service times that I was seeing at small scale. This is probably a timing artifact, from too-short invocations, since I'm using @Level.Invocation in the put() tests. To fix that, I enlarged the unit of testing, by creating multiple, sometimes thousands, of maps for the invocation to fill. This has also changed the test from filling a previously-filled map, to filling a new, but sufficiently sized map. The put()/remove() test now performs much worse (on a more realistic scenario). This also adds a couple tests for calling get() against a map that's been filled only with put()s, or with a mix of put() and remove().
| * | Add a reference to Doug Lea's benchmarks.Performant Data LLC2016-05-031-1/+2
| | |
| * | Add JMH to the benchmark framework.Performant Data LLC2016-05-035-0/+156
| | | | | | | | | | | | Add an example benchmark for OpenHashMap.
* | | Merge pull request #5169 from som-snytt/issue/4625Lukas Rytz2016-05-239-0/+46
|\ \ \ | | | | | | | | SI-4625 Recognize App in script
| * | | SI-4625 Warn on first non-toplevel onlySom Snytt2016-05-171-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | Fixed the warning when main module is accompanied by snippets. Minor clean-up so even I can follow what is returned.
| * | | SI-4625 Warn when discarding script objectSom Snytt2016-05-173-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | It's pretty confusing when your script object becomes a local and then nothing happens. Such as when you're writing a test and it takes forever to figure out what's going on.
| * | | SI-4625 Permit arbitrary top-level in scriptSom Snytt2016-05-163-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | In an unwrapped script, where a `main` entry point is discovered in a top-level object, retain all top-level classes. Everything winds up in the default package.
| * | | SI-4625 Recognize App in scriptSom Snytt2016-05-163-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Cheap name test: if the script object extends "App", take it for a main-bearing parent. Note that if `-Xscript` is not `Main`, the default, then the source is taken as a snippet and there is no attempt to locate an existing `main` method.
* | | | Merge pull request #5167 from martijnhoekstra/SI-9766Lukas Rytz2016-05-231-0/+18
|\ \ \ \ | | | | | | | | | | SI 9766 - allow ++ on empty ConcatIterator
| * | | | SI-9766 - allow ++ on empty ConcatIteratorMartijn Hoekstra2016-05-211-0/+18
| |/ / /
* | | / SI-9688 Make merge in immutable HashMap1 work with null kv.Łukasz Gieroń2016-05-231-0/+48
| |_|/ |/| | | | | | | | | | | | | | | | | | | | The kv field of scala.collection.immutable.HashMap.HashMap1 can be null. This commit corrects the behavior of updated0 (which is on call path for merged) to work in such cases, instead of throwing NPE. Commit contains regression test.
* | | Move t8449 to correct placeLukas Rytz2016-05-172-0/+0
|/ / | | | | | | Follow-up for https://github.com/scala/scala/pull/4117
* / SI-9740 Repl import fix -Yrepl-class-basedSom Snytt2016-05-026-73/+55
|/ | | | | | | Under `-Yrepl-class-based`, templating must follow the same scoping as under traditional object-based. The new test shows a typical case where two values of the same simple name must be imported in different scopes.
* SI-9734 Narrow type when import REPL history (#5084)som-snytt2016-04-202-0/+40
| | | | | Under `-Yrepl-class-based`, imports from historical `$read` instances must be singleton-typed so that path-dependent types remain so.
* SI-9735 REPL prefer standard escapes for code text (#5086)som-snytt2016-04-202-0/+36
| | | | | When constructing code text for compilation, the REPL should prefer standard escape sequences, in case unicode escapes are disabled.
* SI-9488 - adds the same default toString format to Scala Futures as 2.12.xViktor Klang2016-03-221-2/+18
| | | | Includes tests to verify the toString representations.
* SI-9425 Fix a residual bug with multi-param-list case classesJason Zaugg2016-03-041-0/+15
| | | | | | | | During code review for the fix for SI-9546, we found a corner case in the SI-9425 that remained broken. Using `finalResultType` peels off all the constructor param lists, and solves that problem.
* SI-9546 Fix regression in rewrite of case apply to constructor callJason Zaugg2016-03-021-0/+13
| | | | | | | | | | | | | | | | | | | | | In SI-9425, I disabled the rewrite of `CaseClass.apply(x)` to `new CaseClass(x)` if the constructor was was less accessible than the apply method. This solved a problem with spurious "constructor cannot be accessed" errors during refchecks for case classes with non-public constructors. However, for polymorphic case classes, refchecks was persistent, and even after refusing to transform the `TypeApply` within: CaseClass.apply[String]("") It *would* try again to transform the enclosing `Select`, a code path only intended for monomorphic case classes. The tree has a `PolyType`, which foiled the newly added accessibility check. I've modified the call to `isSimpleCaseApply` from the transform of `Select` nodes to exclude polymorphic apply's from being considered twice.
* Refactor transform of case apply in refchecksJason Zaugg2016-03-023-0/+42
| | | | | | | | | | | | | | | | I've identified a dead call to `transformCaseApply` that seems to date back to Scala 2.6 vintages, in which case factory methods were a fictional companion method, rather than a real apply method in a companion module. This commit adds an abort in that code path to aide code review (if our test suite still passes, we know that I've removed dead code, rather than silently changing behaviour.) The following commit will remove it altogether I then inlined a slightly clunky abstraction in the two remaining calls to `transformCaseApply`. It was getting in the way of a clean fix to SI-9546, the topic of the next commit.
* Update partest to 1.0.12, test case for reporting invalid flagsLukas Rytz2016-02-175-2/+12
| | | | | | Conflicts: test/files/pos/t3420.flags versions.properties
* Merge pull request #4937 from szeiger/issue/9623-2.11Seth Tisue2016-02-081-0/+28
|\ | | | | SI-9623 Avoid unnecessary hasNext calls in JoinIterator & ConcatIterator
| * SI-9623 Avoid unnecessary hasNext calls in JoinIterator & ConcatIteratorStefan Zeiger2016-02-011-0/+28
| | | | | | | | | | | | | | | | | | | | | | These iterator implementations are used to concatenate two (JoinIterator) or more (ConcatIterator) other iterators with `++`. They used to perform many unnecessary calls to the child iterators’ `hasNext` methods. This improved state machine-based implementation reduces that number to the bare minimum, i.e. iterating over concatenated iterators with `foreach` calls the children's `hasNext` methods a total of (number of children) + (number of elements) times, the same as when iterating over all children separately.
* | Merge pull request #4927 from szeiger/issue/9572Jason Zaugg2016-02-012-0/+13
|\ \ | | | | | | SI-9572 Check for illegal tuple sizes in the parser
| * | SI-9572 Check for illegal tuple sizes in the parserStefan Zeiger2016-01-282-0/+13
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit adds explicit checks with syntax errors for tuple literals and types of more than 22 elements. An alternative approach to fixing SI-9572 would be to revert to the old failure mode of Scala 2.10 where references to arbitrary `scala.TupleXY` would be generated in the parser, which then leads to “type/object not found” errors in the typechecker. This fix here is more intrusive but arguably provides a better user experience. Methods `stripParens` and `makeBinop` are moved from `TreeBuilder` to `Parsers` because they can now generate syntax errors. New methods `makeSafeTupleType` and `makeSafeTupleTerm` implement the error checking on top of `makeTupleType` and `makeTupleTerm`. They are overridden with no-op versions in the quasiquotes parser because it also overrides `makeTupleType` and `makeTupleTerm` in a way that supports arbitrary tuple sizes.
* / SI-9534 Use BoxedUnit in all cases for creating Array[Unit]Stefan Zeiger2016-01-271-1/+11
|/ | | | | | | | Calling `wrap` or one of the higher-dimension Array factory methods on the `Manifest` for `Unit` led to an exception because it tried to use `void` as a primitive type. Unlike all other primitive Scala types, `Unit` needs to be boxed. The basic `newArray` method was not affected by this bug because it was already special-cased. The fix is to also special-case `arrayClass`.
* Trim complexity in CommentFactoryBaseJanek Bogucki2016-01-252-0/+69
| | | | | | | | | | 1. Replace option handling with library call 2. Remove NumberFormatException catch presumed to be copy/paste legacy 3. It's Scaladoc 4. Parse trailing whitespace regex once instead of per line 5. Use string interpolation where it improves readability 6. Add missed alternative to block grammar production rule 7. Add regression test for tag requirement warnings