summaryrefslogtreecommitdiff
path: root/test/files/jvm
Commit message (Collapse)AuthorAgeFilesLines
* Normalized line endings.Paul Phillips2012-09-202-128/+128
| | | | | | This brings all the files into line with the .gitattributes settings, which should henceforth be automatically maintained by git.
* Merge pull request #1298 from pavelpavlov/SI-5767Josh Suereth2012-09-184-4/+92
|\ | | | | SI-5767 fix + protecting public FlatHashMap API
| * pull request feedbackPavel Pavlov2012-09-184-4/+92
| |
* | Merge remote-tracking branch 'origin/2.10.x' into fix-duration-issues-RKRoland2012-09-121-1/+28
|\ \
| * | improve docs and Promise implRoland2012-09-111-8/+1
| | | | | | | | | | | | | | | | | | | | | - scaladoc the exceptions thrown by Await.* and Awaitable.* - move intercept[Exception] into partest’s TestUtil object - improve Promise.tryAwait implementation following Viktor’s comments and make use of Deadline to avoid calling System.nanoTime too often
| * | fix usage of Duration in Promise implRoland2012-09-101-0/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | - correctly treat MinusInf and Undefined - don't toMillis in the timeout message (could be MinusInf) - also notice that Inf did not actually wait unbounded - and further notice that tryAwait swallows InterruptedException instead of bailing out early => changed to do so and added throws annotation - also removed some unused imports of Duration
* | | two more minor cleanups to DurationRoland2012-09-111-6/+1
| | | | | | | | | | | | | | | - copy partest TestUtil.intercept change from PR 1279 branch - add comment on non-obvious match cases
* | | fix some one more issue in DurationRoland2012-09-071-6/+12
| | | | | | | | | | | | | | | | | | | | | - Inf / Zero == Inf - add some more missing test cases - clarify magic constant - move exception descriptions into proper @throws docs
* | | second round of Duration cleanupRoland2012-09-071-79/+157
| | | | | | | | | | | | | | | | | | | | | | | | - make Duration behave consistent with Double's non-finite semantics - add ScalaDoc - add complete test suite - change overflow protection impl after review comments - clean up code
* | | several fixes to scala.concurrent.util.DurationRoland2012-09-053-24/+141
|/ / | | | | | | | | | | | | | | | | | | | | - add test cases (migrated from Akka sources) - add overflow checking (will throw IllegalArgumentException instead of giving wrong results) - make string parsing more precise when giving >100days in nanoseconds - make method signatures more precise in retaining FiniteDuration throughout calculations - fix mul/div of infinities by negative number - add Ordering for Deadline (was accidentally left out earlier)
* | Removing duplication from Duration.Paul Phillips2012-09-042-0/+400
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I don't know what good it is to have code review if we are checking in code like this. We must raise the bar, people. When the justification for code being in the standard library is borderline at best - as it is here - then the code must be of exceptional quality. This code is not of exceptional quality. Mostly these are not behavioral changes, but: - I removed finite_? as it is a gratuitous deviation from every isXXX method in the world. This isn't ruby. - I removed all the regexps, which only made things complicated - I removed all the unnecessary casts, which is to say, all of them - I made more things final, sealed, and private - The unapply structure was all wrong; returning Option[Duration] on the string unapply meant you'd have to say case Duration(Duration(x, y)) => ... So I fixed apply and unapply to be symmetric. - And I removed the "parse" method, since it was doing what apply is supposed to do. There's a test case to exercise accessing it from java, which also reveals what I hope are bugs. Thanks to viktor klang for DurationConversions.
* | Merge pull request #1197 from scalamacros/topic/kindEugene Burmako2012-08-291-1/+1
|\ \ | | | | | | removes Symbol.kind and Type.kind
| * | removes Symbol.kind and Type.kindEugene Burmako2012-08-261-1/+1
| |/ | | | | | | | | | | | | | | | | | | | | | | | | use Universe.showRaw instead: scala> import scala.reflect.runtime.{universe => ru} import scala.reflect.runtime.{universe=>ru} scala> ru.showRaw(typeOf[Int]) res0: String = TypeRef(ThisType(scala), scala.Int, List()) scala> ru.showRaw(typeOf[Int].typeSymbol, printKinds = true) res1: String = scala.Int#CLS
* / Add missing tests for SI-6190Paolo Giarrusso2012-08-251-1/+13
|/ | | | | This was silently fixed in commit 3cb0e784a05db7d0b542cec9bf4c5fbf3772a6cf but no test was added.
* Merge pull request #1056 from heathermiller/try-based-futuresAdriaan Moors2012-08-086-227/+224
|\ | | | | Bases futures on Try instead of Either
| * Fix test for ExecutionContext.preparephaller2012-08-081-1/+1
| |
| * Doc fix on exec ctx prepare method, fix to testsHeather Miller2012-08-082-2/+3
| |
| * Added tests, removal of unnecessary methods, fixes prepareHeather Miller2012-08-072-6/+20
| |
| * Merge branch 'try-based-futures' of https://github.com/heathermiller/scala ↵Heather Miller2012-08-051-0/+61
| |\ | | | | | | | | | into try-based-futures
| | * SI-6185 - add "prepare" hook to ExecutionContextphaller2012-08-051-0/+61
| | | | | | | | | | | | | | | Enables important abstractions to be built on top of futures, such as Twitter's "Local" for handling data local to a callback chain.
| * | Temporarily skips failing test due to optimizer bug SI-6188Heather Miller2012-08-051-5/+5
| |/ | | | | | | Also swaps the arguments to method transform on Try, so as to mirror transform on scala.concurrent.Future.
| * Basing Futures on Try instead of EitherHeather Miller2012-08-046-227/+148
| |
* | Restored :warnings to working order.Paul Phillips2012-08-061-371/+370
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | As seen here. scala> class A { @deprecated("foo") def a = 1 } warning: there were 1 deprecation warnings; re-run with -deprecation for details defined class A scala> :warnings <console>:7: warning: @deprecated now takes two arguments; see the scaladoc. class A { @deprecated("foo") def a = 1 } ^ scala> val x = 5 toString warning: there were 1 feature warnings; re-run with -feature for details x: String = 5 scala> :warnings <console>:7: warning: postfix operator toString should be enabled by making the implicit value language.postfixOps visible. This can be achieved by adding the import clause 'import language.postfixOps' or by setting the compiler option -language:postfixOps. See the Scala docs for value scala.language.postfixOps for a discussion why the feature should be explicitly enabled. val x = 5 toString ^
* Fixes SI-6172.Hubert Plociniczak2012-08-021-0/+3005
| | | | | All the credit for fixing magical constants in the encoding algorithm goes to @magarciaEPFL. This time provided a test case that exercises GenASM.
* SIP-14 - Fix critical Java compatibility issue in scala.concurrent.Awaitphaller2012-07-201-1/+10
| | | | Patch contributed by @viktorklang
* Critical bugfixes/leak fixes/API corrections + ScalaDoc for SIP-14Viktor Klang2012-07-193-16/+19
|
* Merge pull request #856 from havocp/sip14-execution-changesAdriaan Moors2012-07-104-112/+233
|\ | | | | Collection of updates to SIP-14 (scala.concurrent)
| * Collection of updates to SIP-14 (scala.concurrent)Havoc Pennington2012-07-094-112/+233
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Developed by Viktor Klang and Havoc Pennington - add Promise.isCompleted - add Future.successful and Future.failed - add ExecutionContextExecutor and ExecutionContextExecutorService for Java interop - remove defaultExecutionContext as default parameter value from promise and future - add ExecutionContext.Implicits.global which must be explicitly imported, rather than the previous always-available value for the implicit EC - remove currentExecutionContext, since it could create bugs by being out of sync with the implicit ExecutionContext - remove Future task batching (_taskStack) and Future.releaseStack This optimization should instead be implemented either in a specific thread pool or in a specific ExecutionContext. Some pools or ExecutionContexts may not want or need it. In this patch, the defaultExecutionContext does not keep the batching optimization. Whether it should have it should perhaps be determined through benchmarking. - move internalBlockingCall to BlockContext and remove currentExecutionContext In this patch, BlockContext must be implemented by Thread.currentThread, so the thread pool is the only place you can add custom hooks to be run when blocking. We implement BlockContext for the default ForkJoinWorkerThread in terms of ForkJoinPool.ManagedBlocker. - add public BlockContext.current and BlockContext.withBlockContext These allow an ExecutionContext or other code to override the BlockContext for the current thread. With this API, the BlockContext is customizable without creating a new pool of threads. BlockContext.current is needed to obtain the previous BlockContext before you push, so you can "chain up" to it if desired. BlockContext.withBlockContext is used to override the context for a given piece of code. - move isFutureThrowable into impl.Future - add implicitNotFound to ExecutionContext - remove default global EC from future {} and promise {} - add ExecutionContext.global for explicit use of the global default EC, replaces defaultExecutionContext - add a timeout to scala-concurrent-tck tests that block on SyncVar (so tests time out rather than hang) - insert blocking{} calls into concurrent tck to fix deadlocking - add NonFatal.apply and tests for NonFatal - add OnCompleteRunnable marker trait This would allow an ExecutionContext to distinguish a Runnable originating from Future.onComplete (all callbacks on Future end up going through onComplete). - rename ListenerRunnable to CallbackRunnable and use for KeptPromise too Just adds some clarity and consistency.
* | Removing the actor migration undeterministic test.Vojin Jovanovic2012-07-091-188/+0
|/
* SI-5981, SI-5979, SI-5973 Closed. Maintenance to Try.Heather Miller2012-07-052-78/+328
|
* reify no longer dealiases symbols and typesEugene Burmako2012-07-021-58/+58
| | | | | this uncovers a bug in toolboxes: https://issues.scala-lang.org/browse/SI-6007 however that bug is not critical, so it will be dealt with later
* Making Actor Migration Tests deterministic.Vojin Jovanovic2012-06-2018-0/+1081
| | | | Review by: @phaller
* TypeTag => AbsTypeTag, ConcreteTypeTag => TypeTagEugene Burmako2012-06-082-38/+38
| | | | | This protects everyone from the confusion caused by stuff like this: https://issues.scala-lang.org/browse/SI-5884
* removes array tagsEugene Burmako2012-06-081-5/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* repairs the tests after the refactoring spreeEugene Burmako2012-06-083-12/+16
|
* Orphan checkfile remover.Paul Phillips2012-05-261-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Are these -msil checkfiles used in some secret fashion? The level of activity suggest otherwise. Since scala-nightly-msil has been disabled for over a year, it's an easy rm unless someone speaks up. % tools/rm-orphan-checkfiles Scanning for orphan check files... rm 'test/disabled/run/code.check' rm 'test/files/jvm/t1652.check' rm 'test/files/neg/macro-argtype-mismatch.check' rm 'test/files/neg/macro-noncompilertree.check' rm 'test/files/neg/macro-nontree.check' rm 'test/files/run/Course-2002-01-msil.check' rm 'test/files/run/Course-2002-02-msil.check' rm 'test/files/run/Course-2002-03-msil.check' rm 'test/files/run/Course-2002-04-msil.check' rm 'test/files/run/Course-2002-08-msil.check' rm 'test/files/run/Course-2002-09-msil.check' rm 'test/files/run/Course-2002-10-msil.check' rm 'test/files/run/absoverride-msil.check' rm 'test/files/run/bitsets-msil.check' rm 'test/files/run/boolord-msil.check' rm 'test/files/run/bugs-msil.check' rm 'test/files/run/impconvtimes-msil.check' rm 'test/files/run/infix-msil.check' rm 'test/files/run/iq-msil.check' rm 'test/files/run/macro-invalidret-doesnt-conform-to-impl-rettype.check' rm 'test/files/run/macro-rettype-mismatch.check' rm 'test/files/run/misc-msil.check' rm 'test/files/run/promotion-msil.check' rm 'test/files/run/richs-msil.check' rm 'test/files/run/runtime-msil.check' rm 'test/files/run/tuples-msil.check' rm 'test/pending/jvm/t1464.check' rm 'test/pending/run/subarray.check' rm 'test/pending/run/t0446.check' rm 'test/pending/run/t5629.check' Scanning for orphan flags files... rm 'test/files/neg/macro-argtype-mismatch.flags' rm 'test/files/neg/macro-noncompilertree.flags' rm 'test/files/neg/macro-nontree.flags' rm 'test/files/pos/anyval-children.flags' rm 'test/files/pos/t3097.flags' rm 'test/files/run/macro-invalidret-doesnt-conform-to-impl-rettype.flags' rm 'test/files/run/macro-rettype-mismatch.flags'
* Removing non-deterministic actor migration tests.Vojin Jovanovic2012-05-2522-1293/+0
| | | | Testing these issues takes significant amounts of time so I am temporarely removing them from the master. The issue is not in the code but in the tests output order.
* Move implicit ExecutionContext to be determined by lexical scopephaller2012-05-241-0/+121
| | | | | | | | | | | | | | Port of a pull request originally submitted by @havocp. - declare the invariant that all app callbacks have an associated ExecutionContext provided at the place the callback is passed to a method on Future - always run callbacks in their associated EC - since all callbacks have their own EC, Promise does not need one - "internal" callbacks don't need to defer execution either since we know the ultimate app callback will do so, therefore we can use an immediate executor for these
* Merge pull request #575 from vjovanov/actors-migration-kitAdriaan Moors2012-05-2322-0/+1293
|\ | | | | Adding the Actor Migration Kit.
| * Adding the Actor Migration Kit.Vojin Jovanovic2012-05-1822-0/+1293
| | | | | | | | | | | | | | | | | | | | | | | | Kit consists of: 1) The StashingActor which adopts an interface similar to Akka. 2) Props mockup for creating Akka like code 3) Pattern mockup 4) Test cases for every step in the migration. 5) MigrationSystem which will paired on the Akka side. Review of the code : @phaller Review of the build: @jsuereth
* | SIP-14: clean ups and fixesphaller2012-05-173-12/+88
|/
* Removing more unneeded code.Paul Phillips2012-05-151-1/+1
|
* Checkfile update.Paul Phillips2012-05-091-58/+58
|
* Changes scala.math.signum to return negative zeros.Dominik Gruntz2012-05-081-0/+6
|
* fix SI-5682Lukas Rytz2012-05-021-1/+3
|
* Widen types in signatures of Future companion methods, refactor ↵Aleksandar Prokopec2012-05-012-238/+267
| | | | | | | | | | | | | | | | | | | | | | | | | | OnceCanBuildFrom. Removed the implicit modifier on the OnceCanBuildFrom, as we don't support implicit classes with zero arguments. Added an implicit OnceCanBuildFrom method. The idea behind OnceCanBuildFrom is for it to be used by methods which construct collections, but are defined outside of collection classes. OnceCanBuildFrom so far worked only for objects of type TraversableOnce: shuffle(List(1, 2, 3).iterator: TraversableOnce[Int]) but this used to result in an implicit resolution error: shuffle(List(1, 2, 3).iterator) because after the type parameter M for `shuffle` was inferred to Iterator, no implicit of type CanBuildFrom[Iterator[_], A, Iterator[A]] could be found. Introduced another CanBuildFrom to the Iterator companion object. Modified Future tests appropriately.
* Add promises tests.Aleksandar Prokopec2012-04-302-0/+227
|
* Fixed a bug with setting execution contexts.Aleksandar Prokopec2012-04-301-2/+138
| | | | Ported most of the future tests.
* Porting akka future tests.Aleksandar Prokopec2012-04-272-0/+471
| | | | Fixed a bug in Future.zip.
*-. Merge commit 'refs/pull/427/head'; commit 'refs/pull/428/head' into developPaul Phillips2012-04-237-62/+1189
|\ \