From 20d4bf4655643b81eb79a3edf0a61b2d4458ac62 Mon Sep 17 00:00:00 2001 From: Kevin Leung Date: Sat, 17 Jul 2021 13:32:20 +0800 Subject: [PATCH 1/2] Adjust to tink_stream#simplify --- haxe_libraries/tink_core.hxml | 6 +++--- haxe_libraries/tink_streams.hxml | 8 +++----- src/tink/testrunner/Assertions.hx | 12 +++++++----- src/tink/testrunner/Runner.hx | 8 ++++---- 4 files changed, 17 insertions(+), 17 deletions(-) diff --git a/haxe_libraries/tink_core.hxml b/haxe_libraries/tink_core.hxml index 98d5369..0684953 100644 --- a/haxe_libraries/tink_core.hxml +++ b/haxe_libraries/tink_core.hxml @@ -1,3 +1,3 @@ -# @install: lix --silent download "gh://github.com/haxetink/tink_core#abee932c4e724517090238b6527eac28874c0354" into tink_core/1.27.1/github/abee932c4e724517090238b6527eac28874c0354 --cp ${HAXE_LIBCACHE}/tink_core/1.27.1/github/abee932c4e724517090238b6527eac28874c0354/src --D tink_core=1.27.1 \ No newline at end of file +# @install: lix --silent download "gh://github.com/haxetink/tink_core#641f4fdd7c559a3069d59a0056d6c0ce06499b57" into tink_core/2.0.2/github/641f4fdd7c559a3069d59a0056d6c0ce06499b57 +-cp ${HAXE_LIBCACHE}/tink_core/2.0.2/github/641f4fdd7c559a3069d59a0056d6c0ce06499b57/src +-D tink_core=2.0.2 \ No newline at end of file diff --git a/haxe_libraries/tink_streams.hxml b/haxe_libraries/tink_streams.hxml index 3d33804..0db9043 100644 --- a/haxe_libraries/tink_streams.hxml +++ b/haxe_libraries/tink_streams.hxml @@ -1,6 +1,4 @@ -# @install: lix --silent download "gh://github.com/haxetink/tink_streams#5066a96c4a8b483479b6a8df8893eaf8922d3bea" into tink_streams/0.4.0/github/5066a96c4a8b483479b6a8df8893eaf8922d3bea +# @install: lix --silent download "gh://github.com/haxetink/tink_streams#f4478825ef0a30df1187f02a354ec61176b47b8b" into tink_streams/0.3.3/github/f4478825ef0a30df1187f02a354ec61176b47b8b -lib tink_core --cp ${HAXE_LIBCACHE}/tink_streams/0.4.0/github/5066a96c4a8b483479b6a8df8893eaf8922d3bea/src --D tink_streams=0.4.0 -# temp for development, delete this file when pure branch merged --D pure \ No newline at end of file +-cp ${HAXE_LIBCACHE}/tink_streams/0.3.3/github/f4478825ef0a30df1187f02a354ec61176b47b8b/src +-D tink_streams=0.3.3 \ No newline at end of file diff --git a/src/tink/testrunner/Assertions.hx b/src/tink/testrunner/Assertions.hx index cca9246..ec58669 100644 --- a/src/tink/testrunner/Assertions.hx +++ b/src/tink/testrunner/Assertions.hx @@ -38,10 +38,12 @@ abstract Assertions(Impl) from Impl to Impl { @:from public static function ofSurpriseAssertion(p:Surprise):Assertions { - return Stream.future(p.map(function(o):Stream return switch o { - case Success(a): Stream.single(a); - case Failure(e): Stream.ofError(e); - })); + return ofPromiseAssertion(p); + } + + @:from + public static inline function ofPromiseAssertion(p:Promise):Assertions { + return Stream.promise(p.next(assertion -> Stream.single(assertion))); } @:from @@ -51,7 +53,7 @@ abstract Assertions(Impl) from Impl to Impl { @:from public static inline function ofPromiseAssertions(p:Promise):Assertions { - return ofSurpriseAssertions(p); + return Stream.promise(p); } @:from diff --git a/src/tink/testrunner/Runner.hx b/src/tink/testrunner/Runner.hx index e5e97c2..aacf087 100644 --- a/src/tink/testrunner/Runner.hx +++ b/src/tink/testrunner/Runner.hx @@ -101,12 +101,12 @@ class Runner { var assertions = []; return caze.execute().forEach(function(a) { assertions.push(a); - return reporter.report(Assertion(a)).map(function(_) return Resume); + return reporter.report(Assertion(a)).swap(None); }) .next(function(o):Outcome, Error> return switch o { - case Depleted: Success(assertions); - case Halted(_): throw 'unreachable'; - case Failed(e): Failure(e); + case Done: Success(assertions); + case Stopped(_): throw 'unreachable'; + case Failed(_, e): Failure(e); }) .timeout(caze.timeout, timers); }) From e8f70026f16bf179cd8c0113bcef1d72f1075bd1 Mon Sep 17 00:00:00 2001 From: Kevin Leung Date: Sat, 27 Jul 2024 19:52:25 +1000 Subject: [PATCH 2/2] bump libs --- haxe_libraries/tink_chunk.hxml | 4 ++-- haxe_libraries/tink_cli.hxml | 4 ++-- haxe_libraries/tink_core.hxml | 6 +++--- haxe_libraries/tink_io.hxml | 6 +++--- haxe_libraries/tink_macro.hxml | 6 +++--- haxe_libraries/tink_streams.hxml | 4 ++-- haxe_libraries/tink_stringly.hxml | 6 +++--- 7 files changed, 18 insertions(+), 18 deletions(-) diff --git a/haxe_libraries/tink_chunk.hxml b/haxe_libraries/tink_chunk.hxml index 11f51c1..12c1e31 100644 --- a/haxe_libraries/tink_chunk.hxml +++ b/haxe_libraries/tink_chunk.hxml @@ -1,3 +1,3 @@ -# @install: lix --silent download "gh://github.com/haxetink/tink_chunk#d58e35ce6985a9e40e76a9771e8eee30c6efa5aa" into tink_chunk/0.4.0/github/d58e35ce6985a9e40e76a9771e8eee30c6efa5aa --cp ${HAXE_LIBCACHE}/tink_chunk/0.4.0/github/d58e35ce6985a9e40e76a9771e8eee30c6efa5aa/src +# @install: lix --silent download "gh://github.com/haxetink/tink_chunk#f178d47593e42ba184af2eb88db4f8f1f554dbf3" into tink_chunk/0.4.0/github/f178d47593e42ba184af2eb88db4f8f1f554dbf3 +-cp ${HAXE_LIBCACHE}/tink_chunk/0.4.0/github/f178d47593e42ba184af2eb88db4f8f1f554dbf3/src -D tink_chunk=0.4.0 \ No newline at end of file diff --git a/haxe_libraries/tink_cli.hxml b/haxe_libraries/tink_cli.hxml index 5f04018..991b04b 100644 --- a/haxe_libraries/tink_cli.hxml +++ b/haxe_libraries/tink_cli.hxml @@ -1,8 +1,8 @@ -# @install: lix --silent download "gh://github.com/haxetink/tink_cli#1278ad2a34fd5e2403e414aefe09bb938d0c8825" into tink_cli/0.5.1/github/1278ad2a34fd5e2403e414aefe09bb938d0c8825 +# @install: lix --silent download "gh://github.com/haxetink/tink_cli#c9124f9be04baca0cd55f06237a0a9fffb6287dc" into tink_cli/0.5.1/github/c9124f9be04baca0cd55f06237a0a9fffb6287dc -lib tink_io -lib tink_macro -lib tink_stringly --cp ${HAXE_LIBCACHE}/tink_cli/0.5.1/github/1278ad2a34fd5e2403e414aefe09bb938d0c8825/src +-cp ${HAXE_LIBCACHE}/tink_cli/0.5.1/github/c9124f9be04baca0cd55f06237a0a9fffb6287dc/src -D tink_cli=0.5.1 # Make sure docs are generated -D use-rtti-doc \ No newline at end of file diff --git a/haxe_libraries/tink_core.hxml b/haxe_libraries/tink_core.hxml index 0684953..2354244 100644 --- a/haxe_libraries/tink_core.hxml +++ b/haxe_libraries/tink_core.hxml @@ -1,3 +1,3 @@ -# @install: lix --silent download "gh://github.com/haxetink/tink_core#641f4fdd7c559a3069d59a0056d6c0ce06499b57" into tink_core/2.0.2/github/641f4fdd7c559a3069d59a0056d6c0ce06499b57 --cp ${HAXE_LIBCACHE}/tink_core/2.0.2/github/641f4fdd7c559a3069d59a0056d6c0ce06499b57/src --D tink_core=2.0.2 \ No newline at end of file +# @install: lix --silent download "gh://github.com/haxetink/tink_core#670bc1d256a657cee2e78e3554d7effe31c3682d" into tink_core/2.1.1/github/670bc1d256a657cee2e78e3554d7effe31c3682d +-cp ${HAXE_LIBCACHE}/tink_core/2.1.1/github/670bc1d256a657cee2e78e3554d7effe31c3682d/src +-D tink_core=2.1.1 \ No newline at end of file diff --git a/haxe_libraries/tink_io.hxml b/haxe_libraries/tink_io.hxml index ce27158..bfc8754 100644 --- a/haxe_libraries/tink_io.hxml +++ b/haxe_libraries/tink_io.hxml @@ -1,5 +1,5 @@ -# @install: lix --silent download "gh://github.com/haxetink/tink_io#ea6c6eec70f480082c6d8c4deed1cda4ae805fcf" into tink_io/0.8.0/github/ea6c6eec70f480082c6d8c4deed1cda4ae805fcf +# @install: lix --silent download "gh://github.com/haxetink/tink_io#e75bd9d718eda4fea58a49de952fd5439e336d81" into tink_io/0.9.0/github/e75bd9d718eda4fea58a49de952fd5439e336d81 -lib tink_chunk -lib tink_streams --cp ${HAXE_LIBCACHE}/tink_io/0.8.0/github/ea6c6eec70f480082c6d8c4deed1cda4ae805fcf/src --D tink_io=0.8.0 \ No newline at end of file +-cp ${HAXE_LIBCACHE}/tink_io/0.9.0/github/e75bd9d718eda4fea58a49de952fd5439e336d81/src +-D tink_io=0.9.0 \ No newline at end of file diff --git a/haxe_libraries/tink_macro.hxml b/haxe_libraries/tink_macro.hxml index 8bb9353..9e32bc9 100644 --- a/haxe_libraries/tink_macro.hxml +++ b/haxe_libraries/tink_macro.hxml @@ -1,4 +1,4 @@ -# @install: lix --silent download "gh://github.com/haxetink/tink_macro#f1010a518fdefb484eaff8727ff022ba51658e53" into tink_macro/0.23.0/github/f1010a518fdefb484eaff8727ff022ba51658e53 +# @install: lix --silent download "gh://github.com/haxetink/tink_macro#990096cfd58edf3411c74672719ab517ec389810" into tink_macro/1.0.3/github/990096cfd58edf3411c74672719ab517ec389810 -lib tink_core --cp ${HAXE_LIBCACHE}/tink_macro/0.23.0/github/f1010a518fdefb484eaff8727ff022ba51658e53/src --D tink_macro=0.23.0 \ No newline at end of file +-cp ${HAXE_LIBCACHE}/tink_macro/1.0.3/github/990096cfd58edf3411c74672719ab517ec389810/src +-D tink_macro=1.0.3 \ No newline at end of file diff --git a/haxe_libraries/tink_streams.hxml b/haxe_libraries/tink_streams.hxml index 0db9043..c7515cf 100644 --- a/haxe_libraries/tink_streams.hxml +++ b/haxe_libraries/tink_streams.hxml @@ -1,4 +1,4 @@ -# @install: lix --silent download "gh://github.com/haxetink/tink_streams#f4478825ef0a30df1187f02a354ec61176b47b8b" into tink_streams/0.3.3/github/f4478825ef0a30df1187f02a354ec61176b47b8b +# @install: lix --silent download "gh://github.com/haxetink/tink_streams#aa8a05f7a82e5b881ae3bf8df4aa219bd56fec0f" into tink_streams/0.3.3/github/aa8a05f7a82e5b881ae3bf8df4aa219bd56fec0f -lib tink_core --cp ${HAXE_LIBCACHE}/tink_streams/0.3.3/github/f4478825ef0a30df1187f02a354ec61176b47b8b/src +-cp ${HAXE_LIBCACHE}/tink_streams/0.3.3/github/aa8a05f7a82e5b881ae3bf8df4aa219bd56fec0f/src -D tink_streams=0.3.3 \ No newline at end of file diff --git a/haxe_libraries/tink_stringly.hxml b/haxe_libraries/tink_stringly.hxml index dc5dd80..56a8c49 100644 --- a/haxe_libraries/tink_stringly.hxml +++ b/haxe_libraries/tink_stringly.hxml @@ -1,4 +1,4 @@ -# @install: lix --silent download "gh://github.com/haxetink/tink_stringly#38fcef46679d45bdfc33fe31f341d8d0787cc98c" into tink_stringly/0.5.0/github/38fcef46679d45bdfc33fe31f341d8d0787cc98c +# @install: lix --silent download "gh://github.com/haxetink/tink_stringly#b81c058560ef979786a2f8711803e1c47a827df3" into tink_stringly/0.6.0/github/b81c058560ef979786a2f8711803e1c47a827df3 -lib tink_core --cp ${HAXE_LIBCACHE}/tink_stringly/0.5.0/github/38fcef46679d45bdfc33fe31f341d8d0787cc98c/src --D tink_stringly=0.5.0 \ No newline at end of file +-cp ${HAXE_LIBCACHE}/tink_stringly/0.6.0/github/b81c058560ef979786a2f8711803e1c47a827df3/src +-D tink_stringly=0.6.0 \ No newline at end of file