From 73f22481b626e51c37b53c15f829b83149bd749f Mon Sep 17 00:00:00 2001 From: Lis Date: Sat, 12 Mar 2016 10:38:22 +0300 Subject: [PATCH] Ceylon 1.2.2 --- README.md | 14 +++++----- .../herd/examples/asynctest/module.ceylon | 14 +++++----- .../herd/asynctest/AsyncTestExecutor.ceylon | 4 +-- source/herd/asynctest/TestGroup.ceylon | 1 + source/herd/asynctest/TestSuite.ceylon | 14 ++++++---- source/herd/asynctest/TestSummary.ceylon | 1 + source/herd/asynctest/match/package.ceylon | 8 +++--- source/herd/asynctest/module.ceylon | 28 +++++++++---------- 8 files changed, 44 insertions(+), 40 deletions(-) diff --git a/README.md b/README.md index 527b23d..9517728 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/examples/herd/examples/asynctest/module.ceylon b/examples/herd/examples/asynctest/module.ceylon index a297779..881b9cd 100644 --- a/examples/herd/examples/asynctest/module.ceylon +++ b/examples/herd/examples/asynctest/module.ceylon @@ -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"; } diff --git a/source/herd/asynctest/AsyncTestExecutor.ceylon b/source/herd/asynctest/AsyncTestExecutor.ceylon index d5eebd9..1b3a127 100644 --- a/source/herd/asynctest/AsyncTestExecutor.ceylon +++ b/source/herd/asynctest/AsyncTestExecutor.ceylon @@ -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 not 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. diff --git a/source/herd/asynctest/TestGroup.ceylon b/source/herd/asynctest/TestGroup.ceylon index c00b281..bb3022f 100644 --- a/source/herd/asynctest/TestGroup.ceylon +++ b/source/herd/asynctest/TestGroup.ceylon @@ -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 diff --git a/source/herd/asynctest/TestSuite.ceylon b/source/herd/asynctest/TestSuite.ceylon index fe09cda..bf30572 100644 --- a/source/herd/asynctest/TestSuite.ceylon +++ b/source/herd/asynctest/TestSuite.ceylon @@ -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]]. + -------------------------------------------- " diff --git a/source/herd/asynctest/TestSummary.ceylon b/source/herd/asynctest/TestSummary.ceylon index 6c4fa52..474467c 100644 --- a/source/herd/asynctest/TestSummary.ceylon +++ b/source/herd/asynctest/TestSummary.ceylon @@ -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." diff --git a/source/herd/asynctest/match/package.ceylon b/source/herd/asynctest/match/package.ceylon index 0e8e26c..8d31d41 100644 --- a/source/herd/asynctest/match/package.ceylon +++ b/source/herd/asynctest/match/package.ceylon @@ -1,13 +1,13 @@ "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 meet to don't meet state + Also a matcher can be reverted from _satisfied_ to _unsatisfied_ state and visa versa using [[Matcher.not]] method. Example: @@ -15,8 +15,8 @@ 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. -------------------------------------------- " diff --git a/source/herd/asynctest/module.ceylon b/source/herd/asynctest/module.ceylon index 3ef4742..75c6e03 100644 --- a/source/herd/asynctest/module.ceylon +++ b/source/herd/asynctest/module.ceylon @@ -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. ------------------------------------------- @@ -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 @@ -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: @@ -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"; }