Skip to content

Commit

Permalink
Merge pull request #5 from LisiLisenok/develop
Browse files Browse the repository at this point in the history
Ceylon 1.2.2
  • Loading branch information
LisiLisenok committed Mar 12, 2016
2 parents 188383e + 73f2248 commit ca8db5c
Show file tree
Hide file tree
Showing 8 changed files with 44 additions and 40 deletions.
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,24 +17,24 @@ The module is available on [CeylonHerd](https://herd.ceylon-lang.org/modules/her

#### Ceylon compiler / platform

Compiled with Ceylon 1.2.1
Compiled with Ceylon 1.2.2
Available on JVM only


#### Dependencies

* ceylon.collection/1.2.1
* ceylon.file/1.2.1
* ceylon.language/1.2.1
* ceylon.promise/1.2.1 shared
* ceylon.test/1.2.1 shared
* ceylon.collection/1.2.2
* ceylon.file/1.2.2
* ceylon.language/1.2.2
* ceylon.promise/1.2.2 shared
* ceylon.test/1.2.2 shared
* java.base/8 JDK


#### Usage and documentation

The extension is aimed to be run using Ceylon test tool.
See usage details in [API documentation](https://modules.ceylon-lang.org/repo/1/herd/asynctest/0.5.0/module-doc/api/index.html).
See usage details in [API documentation](https://modules.ceylon-lang.org/repo/1/herd/asynctest/0.5.1/module-doc/api/index.html).


#### Examples
Expand Down
14 changes: 7 additions & 7 deletions examples/herd/examples/asynctest/module.ceylon
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@ license (
)
by( "Lis" )
native( "jvm" )
module herd.examples.asynctest "0.5.0" {
shared import ceylon.promise "1.2.1";
shared import ceylon.test "1.2.1";
shared import ceylon.collection "1.2.1";
shared import herd.asynctest "0.5.0";
module herd.examples.asynctest "0.5.1" {
shared import ceylon.collection "1.2.2";
shared import ceylon.json "1.2.2";
shared import ceylon.file "1.2.2";
shared import ceylon.promise "1.2.2";
shared import ceylon.test "1.2.2";
shared import herd.asynctest "0.5.1";
shared import java.base "8";
shared import ceylon.json "1.2.1";
shared import ceylon.file "1.2.1";
}
4 changes: 2 additions & 2 deletions source/herd/asynctest/AsyncTestExecutor.ceylon
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@ import ceylon.test.engine.spi {
This step is nesseccary to continue testing with next execution since test executor blocks execution thread until
[[AsyncTestContext.complete]] is called.
>Test function is responsible to catch all exceptions / assertions and to redirect them to `AsyncTestContext`.
>Test function is responsible to catch all exceptions / assertions and to redirect them to `AsyncTestContext`.
>It is <i>not</i> recommended to use `ceylon.test::assertXXX` functions together with [[AsyncTestContext]],
>It is _not_ recommended to use `ceylon.test::assertXXX` functions together with [[AsyncTestContext]],
since this functions throws an exception which may lead to immediate testing completion.
Report via [[AsyncTestContext]] instead.
Expand Down
1 change: 1 addition & 0 deletions source/herd/asynctest/TestGroup.ceylon
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import ceylon.language.meta.declaration {


"Identifies a test group."
see( `interface TestMaintainer`, `class TestSummary` )
by( "Lis" )
shared final class TestGroup (
"Container the group is originated for." shared ClassDeclaration | Package container
Expand Down
14 changes: 8 additions & 6 deletions source/herd/asynctest/TestSuite.ceylon
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@


"Interface implementation of test suite has to satisfy.
Test suite can be used in order to organize test functions into a one suite and to perform common
"Test suite can be used in order to organize test functions into a one suite and to perform common
test initialization / disposing.
Before executing any test [[TestSuite.initialize]] is called with initializer context of [[TestInitContext]].
Before executing any test [[TestSuite.initialize]] is called by test executor
with initializer context of [[TestInitContext]].
Initializer has to call [[TestInitContext.proceed]] or [[TestInitContext.abort]] when initialization
is completed or failured, correspondently.
When test is completed [[TestSuite.dispose]] is called.
When test is completed [[TestSuite.dispose]] is called by test executor.
>SDK `ceylon.test::after` and `ceylon.test::before` annotations don't work with [[AsyncTestExecutor]].
--------------------------------------------
"
Expand Down
1 change: 1 addition & 0 deletions source/herd/asynctest/TestSummary.ceylon
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import ceylon.test {


"Represents a summary of test group execution."
see( `interface TestMaintainer`, `class TestGroup` )
by( "Lis" )
shared final class TestSummary (
"The worst state from the all executed test results."
Expand Down
8 changes: 4 additions & 4 deletions source/herd/asynctest/match/package.ceylon
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@

"Basically, matcher is a rule and verification method
which identifies if submitted test value satisfies this rule or not.
which identifies if submitted test value satisfies this rule or not.
[[Matcher]] interface is base entry for each matcher.
Verification is performed using [[Matcher.match]] method. Result of verification
is [[MatchResult]] which is simply satisfied / unsatisfied `Boolean` and `String` message describing
matching operation.
Matchers may be combined with each other using `and`, `or` and `xor` methods of [[Matcher]] interface.
Also a matcher can be reverted from <i>meet</i> to <i>don't meet</i> state
Also a matcher can be reverted from _satisfied_ to _unsatisfied_ state
and visa versa using [[Matcher.not]] method.
Example:
asyncTestContext.assertThat(joda, IsType(Jedi).and(Mapping((Master master)=>master.padawans, Contains(luke)));
>Matchers are used in conjunction with [[herd.asynctest::AsyncTestContext.assertThat]]
and [[herd.asynctest::AsyncTestContext.assumeThat]]
>Matchers are aimed to be used in conjunction with [[herd.asynctest::AsyncTestContext.assertThat]]
and [[herd.asynctest::AsyncTestContext.assumeThat]] methods.
--------------------------------------------
"
Expand Down
28 changes: 14 additions & 14 deletions source/herd/asynctest/module.ceylon
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@
* If you prefer to execute test functions in sequential mode rather then in default concurrent one:
mark `class`, `package` or `module` with [[sequential]] annotation.
* If you would like to sort an order the tests are executed in:
1. Create your tests.
2. Implement [[TestMaintainer]].
3. Mark `package` or `module` with [[maintainer]] annotation specifying
declaration of your [[TestMaintainer]] implementation.
1. Create your tests.
2. Implement [[TestMaintainer]].
3. Mark `package` or `module` with [[maintainer]] annotation specifying
declaration of your [[TestMaintainer]] implementation.
-------------------------------------------
Expand All @@ -64,11 +64,11 @@
>Test executor blocks the thread until [[AsyncTestContext.complete]] is called. It means test function
has to notify completion to continue with other testing and to report results.
has to notify completion to continue with other testing and to report results.
>If a number of test functions are declared within some class
just a one instance of the class is used for the overall test runcycle.
just a one instance of the class is used for the overall test runcycle.
### Test suite
Expand All @@ -87,14 +87,14 @@
>If initialization is aborted using [[TestInitContext.abort]] corresponding tests
are never executed but test aborts are reported.
are never executed but test aborts are reported.
>Use [[TestSuite]] for test initialization. `ceylon.test::beforeTest` and `ceylon.test::afterTest`
don't work with [[AsyncTestExecutor]].
don't work with [[AsyncTestExecutor]].
>Arguments of test suite class can be specified using [[arguments]] annotation.
>Arguments of test suite class can be specified using [[arguments]] annotation.
Example:
Expand Down Expand Up @@ -230,10 +230,10 @@ license (
)
by( "Lis" )
native( "jvm" )
module herd.asynctest "0.5.0" {
module herd.asynctest "0.5.1" {
import java.base "8";
shared import ceylon.test "1.2.1";
import ceylon.collection "1.2.1";
import ceylon.file "1.2.1";
shared import ceylon.promise "1.2.1";
shared import ceylon.test "1.2.2";
import ceylon.collection "1.2.2";
import ceylon.file "1.2.2";
shared import ceylon.promise "1.2.2";
}

0 comments on commit ca8db5c

Please sign in to comment.