summaryrefslogtreecommitdiff
path: root/test/files/presentation
Commit message (Collapse)AuthorAgeFilesLines
* Remove orphaned check files and flags files.Jason Zaugg2013-10-271-1/+0
| | | | (for f in $(find test -name '*.check' -o -name '*.flags'); do bare=$(echo $f | sed -E 's/\.\w+$//'); ([[ -f "$bare" ]] || [[ -d "$bare" ]] || [[ -f "$bare.scala" ]] || [[ -f "$bare.test" ]] || echo $f) done;) | xargs rm
* Merge remote-tracking branch 'origin/2.10.x' into merge/2.10.x-to-master-4Jason Zaugg2013-10-185-169/+0
|\
| * Disable flaky presentation compiler test.Jason Zaugg2013-10-175-161/+0
| | | | | | | | | | | | | | | | Francois is investigating the root cause as part of his work on stabilizing Scaladoc preview in the IDE. The test seems to only fail on the windows nightly build. I suspect this is due to a slower or loaded machine.
* | Cull extraneous whitespace.Paul Phillips2013-09-1811-43/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | One last flurry with the broom before I leave you slobs to code in your own filth. Eliminated all the trailing whitespace I could manage, with special prejudice reserved for the test cases which depended on the preservation of trailing whitespace. Was reminded I cannot figure out how to eliminate the trailing space on the "scala> " prompt in repl transcripts. At least reduced the number of such empty prompts by trimming transcript code on the way in. Routed ConsoleReporter's "printMessage" through a trailing whitespace stripping method which might help futureproof against the future of whitespace diseases. Deleted the up-to-40 lines of trailing whitespace found in various library files. It seems like only yesterday we performed whitespace surgery on the whole repo. Clearly it doesn't stick very well. I suggest it would work better to enforce a few requirements on the way in.
* | SI-7643 Enable newPatternMatching in interactive.Jason Zaugg2013-09-064-0/+18
| | | | | | | | | | | | | | | | | | | | Without it, the enclosed test fails with: ArrayBuffer(Problem(RangePosition(partial-fun/src/PartialFun.scala, 62, 62, 77),type mismatch; found : Int => Int required: PartialFunction[Int,Int],2)) And with that, we can remove this option altogether.
* | Remove dependency on typer phase in ClassfileParser.Grzegorz Kossakowski2013-07-271-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ClassfileParser depends on forcing infos during typer phase. It's not entirely clear why this is needed (git blame doesn't help much) but I decided to preserve the logic. Therefore, I introduced an abstract method called `lookupMemberAtTyperPhaseIfPossible` which preserves the original semantics but is implemented outside of ClassfileParser so the ClassfileParser itself doesn't need to depend on typer phase and phase mutation utilities. I removed `loaders` override in `test/files/presentation/doc`. I would have to update it to implement the `lookupMemberAtTyperPhaseIfPossible` method. However, the override doesn't seem to be doing anything useful so I just removed it.
* | SI-7003 Partest redirects stderr to log fileSom Snytt2013-05-252-8/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some scalac output is on stderr, and it's useful to see that in the log file, especially for debugging. Adds a line filter for logs, specified as "filter: pattern" in the test source. Backslashes are made forward only when detected as paths. Test alignments: Deprecations which do not pertain to the system under test are corrected in the obvious way. When testing deprecated API, suppress warnings by deprecating the Test object. Check files are updated with useful true warnings, instead of running under -nowarn. Language feature imports as required, instead of running under -language. Language feature not required, such as casual use of postfix. Heed useful warning. Ignore broken warnings. (Rarely, -nowarn.) Inliner warnings pop up under -optimise only, so for now, just filter them out where they occur. Debug output from the test required an update.
* | An attempt to make tests deterministic.Paul Phillips2013-05-192-2/+2
| | | | | | | | | | | | | | | | | | | | | | The nondeterminism presently showing itself in presentation/implicit-member is a consequence of the presentation compiler tests relying on details of the behavior of toString calls. We need to stomp this out, but it will take a while. Based on the check file changes enclosed with this commit, this will suffice for the presentation compiler tests. A broader assault will have to take place, but not yet.
* | Merge pull request #2454 from vigdorchik/scaladoc_fixesJason Zaugg2013-05-171-1/+1
|\ \ | | | | | | This is a cleanup of scaladoc code.
| * | Improve code style in the Scaladoc implementation.Eugene Vigdorchik2013-05-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | It fixes the following inefficiences or code style violations: - Explicit asInstanceOf calls. - Boxing symbols instead of using plain NoSymbol. - Matching `this` instead of late-binding.
* | | More useful checkfile output in interactive tests.Paul Phillips2013-04-3010-692/+692
| | | | | | | | | | | | | | | | | | I resisted the urge to fix "aksTypeCompletion" for as long as I possibly could. While I was there I threw in what seem to be like significant output improvements, but you tell me.
* | | SI-7362, crash in presentation compiler.Paul Phillips2013-04-303-0/+76
|/ / | | | | | | Code by retronym, test by huitseeker, I just move stuff around.
* | Simplify type bounds.Paul Phillips2013-04-201-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I started out looking to limit the noise from empty type bounds, i.e. the endless repetition of class A[T >: _root_.scala.Nothing <: _root_.scala.Any] This led me to be reminded of all the unnecessary and in fact damaging overreaches which are performed during parsing. Why should a type parameter for which no bounds are specified be immediately encoded with this giant tree: TypeBounds( Select(Select(Ident(nme.ROOTPKG), tpnme.scala_), tpnme.Nothing), Select(Select(Ident(nme.ROOTPKG), tpnme.scala_), tpnme.Any) ) ...which must then be manually recognized as empty type bounds? Truly, this is madness. - It deftly eliminates the possibility of recognizing whether the user wrote "class A[T]" or "class A[T >: Nothing]" or "class A[T <: Any]" or specified both bounds. The fact that these work out the same internally does not imply the information should be exterminated even before parsing completes. - It burdens everyone who must recognize type bounds trees, such as this author - It is far less efficient than the obvious encoding - It offers literally no advantage whatsoever Encode empty type bounds as TypeBounds(EmptyTree, EmptyTree) What could be simpler.
* | Improve testing interactive experience.Eugene Vigdorchik2013-03-262-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently the exceptions that happen in the test are swallowed, as the JVM is forced to exit before printing the stack trace. Also assert message doesn't contain information about the problem. The call to "sys.exit" masks bugs in the testing framework, that has to be addressed more elaborately, so here we remove it. Also add the message parameter to assert to make it more informative. After removing "sys.exit" call, doc test starts failing. I suspect there might be a problem when expanding doc variables, but this should be addressed separately.
* | Merge 2.10.x into masterAdriaan Moors2013-03-122-1/+168
|\| | | | | | | | | Conflicts: src/compiler/scala/tools/nsc/typechecker/Typers.scala
| * Fix SI-7224.Iulian Dragos2013-03-072-1/+168
| | | | | | | | | | | | | | Don't focus positions assigned to the TypeTree of a parent of a Template when the parent exists in the source. A focused position (instance of `OffsetPosition`) makes it invisible to the presentation compiler when it looks for the innermost enclosing tree of a given position (breaking hyperlinking, for example).
* | Eliminated all forInteractive/forScaladoc uses.Paul Phillips2013-03-095-0/+173
| | | | | | | | | | | | | | | | This is the commit which brings it all together. The booleans forInteractive and forScaladoc are now deprecated and are not inspected for any purpose. All behavioral changes formerly accomplished via tests of those flags are embodied in the globals built specifically for those tasks.
* | Moved scaladoc code into src/scaladoc.Paul Phillips2013-03-095-167/+0
| | | | | | | | | | | | This leverages the preceding several commits to push scaladoc specific code into src/scaladoc. It also renders some scanner code more comprehensible.
* | Merge 2.10.x into master.Adriaan Moors2013-03-056-84/+106
|\| | | | | | | | | | | | | | | Resurrect some undead code from 373ded2ad3 (tuple2Pickler). Conflicts: src/compiler/scala/tools/nsc/interactive/CompilerControl.scala src/compiler/scala/tools/nsc/typechecker/Typers.scala
| * SI-7109 SI-7153 Generalize the API to get docComments: allow to force docTreesEugene Vigdorchik2013-02-246-84/+106
| | | | | | | | | | | | for given fragments. Don't type-check when forcing doc comments, but rather do it directly. Test the new functionality as well as better tests for the old one.
* | Merge 2.10.x into master.Adriaan Moors2013-02-206-13/+37
|\| | | | | | | | | | | | | | | Conflicts: build.number src/compiler/scala/tools/nsc/doc/base/MemberLookupBase.scala src/compiler/scala/tools/nsc/typechecker/Macros.scala test/files/presentation/doc/doc.scala
| * Merge pull request #2130 from vigdorchik/relax_docJames Iry2013-02-192-9/+7
| |\ | | | | | | SI-7134: don't require doc.Settings in base api of scaladoc.
| | * SI-7134: don't require doc.Settings in base api of scaladoc.Eugene Vigdorchik2013-02-152-9/+7
| | |
| * | unit test ide-t1000567 exercises SI-5063, aka #1000567.François Garillot2013-02-194-0/+26
| |/
* | Maintenance of Predef.Paul Phillips2013-02-128-15/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1) Deprecates much of Predef and scala.Console, especially: - the read* methods (see below) - the set{Out,Err,In} methods (see SI-4793) 2) Removed long-deprecated: - Predef#exit - Predef#error should have gone, but could not due to sbt At least the whole source base has now been future-proofed against the eventual removal of Predef#error. The low justification for the read* methods should be readily apparent: they are little used and have no call to be in global namespace, especially given their weird ad hoc semantics and unreasonably tempting names such as readBoolean(). 3) Segregated the deprecated elements in Predef from the part which still thrives. 4) Converted all the standard Predef implicits into implicit classes, value classes where possible: - ArrowAssoc, Ensuring, StringFormat, StringAdd, RichException (value) - SeqCharSequence, ArrayCharSequence (non-value) Non-implicit deprecated stubs prop up the names of the formerly converting methods.
* | Merge remote-tracking branch 'origin/2.10.x' into merge-210Paul Phillips2013-02-104-0/+106
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * origin/2.10.x: Fix for paramaccessor alias regression. Expanded bytecode testing code. SI-5675 Discard duplicate feature warnings at a position accommodates pull request feedback term and type reftrees are now reified uniformly SI-6591 Reify and path-dependent types SI-7096 SubstSymMap copies trees before modifying their symbols SI-6961 no structural sharing in list serialization SI-6187 Make partial functions re-typable [backport] SI-6478 Fixing JavaTokenParser ident SI-7100 Fixed infinite recursion in duplicators SI-6146 More accurate prefixes for sealed subtypes. SI-5082 Cycle avoidance between case companions SI-6113 typeOf now works for type lambdas SI-5824 Fix crashes in reify with _* SI-7026: parseTree should never return a typed one SI-7070 Turn restriction on companions in pkg objs into warning Conflicts: src/compiler/scala/reflect/reify/codegen/GenSymbols.scala src/compiler/scala/tools/nsc/typechecker/PatternMatching.scala src/compiler/scala/tools/nsc/typechecker/Typers.scala src/compiler/scala/tools/reflect/ToolBoxFactory.scala src/library/scala/collection/immutable/List.scala src/reflect/scala/reflect/internal/TreeInfo.scala src/reflect/scala/reflect/internal/Types.scala src/reflect/scala/reflect/internal/settings/MutableSettings.scala src/reflect/scala/reflect/runtime/Settings.scala test/files/buildmanager/t2650_1/t2650_1.check test/files/buildmanager/t2657/t2657.check test/files/neg/t3234.check test/files/run/idempotency-this.check test/files/run/macro-typecheck-macrosdisabled2.check test/files/run/showraw_tree.check test/files/run/showraw_tree_ids.check test/files/run/showraw_tree_kinds.check test/files/run/showraw_tree_types_ids.check test/files/run/showraw_tree_types_typed.check test/files/run/showraw_tree_types_untyped.check test/files/run/showraw_tree_ultimate.check test/files/run/t2886.check test/files/run/t5225_2.check test/files/run/t5374.check test/files/run/t5374.scala test/files/run/t6329_repl.check test/files/run/toolbox_typecheck_macrosdisabled2.check
| * Merge pull request #1993 from mads379/SI-7026-2.10.xAdriaan Moors2013-02-073-0/+100
| |\ | | | | | | SI-7026 Asking for a parse tree will now never result in a typed tree
| | * SI-7026: parseTree should never return a typed oneMads Hartmann Jensen2013-02-073-0/+100
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit fixes ticket SI-7026. This makes it safe to use parseTree outside of the presentation compiler thread. Solved it with an implementation that just parses the source every time without trying to memorize anything. Added tests that checks that 1. You get a new parse tree every time you ask for one. 2. You always get a parse tree, never a typed tree. 3. A parse tree should never contain any symbols or types [1]. 4. If you ask for a parse tree and then ask for a typed tree it shouldn't change the parse tree you originally asked for, i.e. property 3 still holds. Additionally the parser is now only interruptible when running on the presentation compiler thread. [1] There is an exception to this though. Some of the nodes that the compiler generates will actually contain symbols. I've chosen to just ignore these special cases for now.
* | | Merge commit 'f784fbfbce' into merge-210Paul Phillips2013-02-102-16/+37
|\| | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'f784fbfbce': Add a request to presentation compiler to fetch doc comment information. Refactor scaladoc base functionality to allow it to be mixed in with Global in the IDE. Conflicts: src/compiler/scala/tools/nsc/interactive/Doc.scala
| * | Add a request to presentation compiler to fetch doc comment information.Eugene Vigdorchik2013-02-062-16/+37
| |/ | | | | | | Refactor scaladoc base functionality to allow it to be mixed in with Global in the IDE.
* | SI-6811 Remove primitive widenings and /:\Simon Ochsenreither2013-01-178-31/+15
| |
* | Merge remote-tracking branch 'origin/2.10.x' into merge-2.10.xPaul Phillips2012-12-204-1/+124
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * origin/2.10.x: (31 commits) Implicit vars should have non-implicit setters. Deprecate `scala.tools.nsc.Phases` because it's dead-code. scaladoc Template: remove duplicate code and several usages of Option.get. adds scala-reflect.jar to MIMA in ant Test showing the absence of a forward reference update mailmap Remove dead code from `Global`. Cleanup MemberLookup. Better explain ambiguous link targets. typedIdent no longer destroys attachments fixes incorrect handling of Annotated in lazy copier simplifies checkBounds Recurse into instantiations when stripping type vars. Extract base scaladoc functionality for the IDE. Expand pattern match position tests. SI-6288 Remedy ill-positioned extractor binding. SI-6288 Fix positioning of label jumps SI-6288 Position argument of unapply Fixes SI-6758: force LazyAnnnotationInfo for DefDef and TypeDef SI-6795 Simplify errors related to "abstract override" on type members SI-6795 Adds negative check for "abstract override" on types in traits ... Conflicts: .mailmap src/compiler/scala/tools/nsc/Global.scala src/compiler/scala/tools/nsc/ast/DocComments.scala src/compiler/scala/tools/nsc/doc/base/CommentFactoryBase.scala src/compiler/scala/tools/nsc/doc/html/page/Source.scala src/compiler/scala/tools/nsc/doc/html/page/Template.scala src/compiler/scala/tools/nsc/doc/model/LinkTo.scala src/compiler/scala/tools/nsc/doc/model/MemberLookup.scala src/compiler/scala/tools/nsc/doc/model/diagram/DiagramFactory.scala src/compiler/scala/tools/nsc/transform/SpecializeTypes.scala src/compiler/scala/tools/nsc/typechecker/Typers.scala src/reflect/scala/reflect/runtime/JavaMirrors.scala test/scaladoc/run/links.scala
| * Extract base scaladoc functionality for the IDE.Eugene Vigdorchik2012-12-124-1/+124
| |
* | Merge remote-tracking branch 'origin/2.10.x' into merge-210Paul Phillips2012-10-191-0/+33
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * origin/2.10.x: (52 commits) JavaUniverse Moved @contentDiagram in Symbols Adds lots of new documentation for TypeTags, Mirrors, Universes and more runtime.JavaUniverse - put ungrouped members at the top Forgotten annotation in Annotations Diagram tweaking Grouping for reflection and macros fixes a typo scala.reflect.api.Symbols documentation Symbols docs cleanup, mostly moved to guide scala.reflect.api.Position documentation scala.reflect.api.StandardNames documentation scala.reflect.api.Constants documentation removed docs for internal TypeCreator and TreeCreator simplified reflection docs for trees Rearranged some reflection docs, moving things to the guide reflection docs improvements and moves to doc page docs for reflection and macros SI-6509 Correct @template owners SI-6155 Scaladoc @template diagrms ... Conflicts: src/compiler/scala/tools/nsc/doc/model/ModelFactory.scala src/compiler/scala/tools/nsc/typechecker/Typers.scala src/reflect/scala/reflect/api/Trees.scala test/scaladoc/run/links.scala
| * Fixed SI-6505. Respond to ask calls by immediate failure even after compiler ↵Iulian Dragos2012-10-101-0/+33
| | | | | | | | | | | | | | shutdown. When the compiler is asked to shutdown, it may still have items on the working queue, and more can be added by clients in other thread that don't *know* the compiler is down yet. These requests were never serviced, leading to deadlocks or timeouts. review by @odersky, @hubertp
* | SI-6467: Zero element in aggregate now by-nameAleksandar Prokopec2012-10-041-1/+1
|/
* Allow nested calls to `askForResponse` in the presentation compiler.Iulian Dragos2012-09-042-0/+24
| | | | | Fix #6312. review by @odersky,@lrytz.
* Allow attachments for symbols, just like for trees.Lukas Rytz2012-07-057-0/+56
| | | | Removes the two global hash maps in Namers, and the one in NamesDefaults. Also fixes SI-5975.
* Enhanced presentation compiler test infrastructureMirco Dotta2012-07-057-35/+6
| | | | | | | | | | * Removed unneeded .flags. * Renamed a few methods in `InteractiveTest`. * Force the presentation compiler to shut down after each test. * -sourcepath in the .flags file is now relative to the test's base directory. * Use `InteractiveReporter` in Presentation Compiler tests. By using the `InteractiveReporter`, compilation errors are collected in the compilation unit. This was necessary for testing SI-5975.
* Renaming convertTo to to on GenTraversableOnce.Josh Suereth2012-06-281-1/+1
|
* Migrate build to @odersky's suggestion of convertTo.Josh Suereth2012-06-181-1/+3
| | | | | | * Move method into TraversableOnce from Iterator and Traversable to make the build pass. * Udpate IDE tests with new collection methods. * Rewire default toXYZ methods to use convertTo.
* removes array tagsEugene Burmako2012-06-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before 2.10 we had a notion of ClassManifest that could be used to retain erasures of abstract types (type parameters, abstract type members) for being used at runtime. With the advent of ClassManifest (and its subtype Manifest) it became possible to write: def mkGenericArray[T: Manifest] = Array[T]() When compiling array instantiation, scalac would use a ClassManifest implicit parameter from scope (in this case, provided by a context bound) to remember Ts that have been passed to invoke mkGenericArray and use that information to instantiate arrays at runtime (via Java reflection). When redesigning manifests into what is now known as type tags, we decided to explore a notion of ArrayTags that would stand for abstract and pure array creators. Sure, ClassManifests were perfectly fine for this job, but they did too much - technically speaking, one doesn't necessarily need a java.lang.Class to create an array. Depending on a platform, e.g. within JavaScript runtime, one would want to use a different mechanism. As tempting as this idea was, it has also proven to be problematic. First, it created an extra abstraction inside the compiler. Along with class tags and type tags, we had a third flavor of tags - array tags. This has threaded the additional complexity though implicits and typers. Second, consequently, when redesigning tags multiple times over the course of Scala 2.10.0 development, we had to carry this extra abstraction with us, which exacerbated the overall feeling towards array tags. Finally, array tags didn't fit into the naming scheme we had for tags. Both class tags and type tags sound logical, because, they are descriptors for the things they are supposed to tag, according to their names. However array tags are the odd ones, because they don't actually tag any arrays. As funny as it might sound, the naming problem was the last straw that made us do away with the array tags. Hence this commit.
* Introduces scala-reflect.jarEugene Burmako2012-06-081-2/+2
|
* repairs the tests after the refactoring spreeEugene Burmako2012-06-082-21/+21
|
* A whole bunch of checkfile updates.Paul Phillips2012-05-107-45/+45
| | | | | Wasn't me this time (I don't think!) Mr. Robot can't get here too soon for me.
* Fixed SI-5708. Correctly compute accessibility for object members.Iulian Dragos2012-05-103-0/+70
|
* Fixed positions in named default applications (no hyperlinking in ↵Iulian Dragos2012-05-085-1/+27
| | | | | | conjunction with implicit arguments). Removed even more code in the presentation compiler testing infrastructure. One less level of indirection, and a top-level object gone!
* What did you bring me Santa?Paul Phillips2012-05-051-1/+2
| | | | Oh boy, a checkfile! This is the best christmas ever!
* remove -Xoldpatmat where test no longer needs itAdriaan Moors2012-05-021-1/+0
|
* Presentation Compiler tests for visibility of members.Iulian Dragos2012-04-309-415/+681
| | | | Removed some unneeded indirection in the testing framework.