From dc99e03f7eb0ed8c8038679b54cf5d484231369d Mon Sep 17 00:00:00 2001 From: WooKyoung Noh Date: Tue, 14 May 2019 00:49:46 +0900 Subject: [PATCH] Jive v0.1.11, `@__END__` --- Project.toml | 2 +- README.md | 39 +++++++--------------------------- docs/src/index.md | 53 +++++++++++++---------------------------------- 3 files changed, 22 insertions(+), 72 deletions(-) diff --git a/Project.toml b/Project.toml index b202ef9..c4a267d 100644 --- a/Project.toml +++ b/Project.toml @@ -4,7 +4,7 @@ keywords = ["distributed", "test"] license = "MIT" desc = "some useful steps in tests" authors = ["WooKyoung Noh "] -version = "0.1.11-DEV" +version = "0.1.11" [deps] Distributed = "8ba89e20-285c-5b6f-9357-94700520ee1b" diff --git a/README.md b/README.md index 08e22e1..b7b48f4 100644 --- a/README.md +++ b/README.md @@ -17,6 +17,7 @@ - [@If](#If) - [@useinside](#useinside) - [@mockup](#mockup) + - [`@__END__`](#__end__) # runtests @@ -173,42 +174,16 @@ used to produce a replica from the other module. * [test/jive/mockup](https://github.com/wookay/Jive.jl/blob/master/test/jive/mockup) -```julia -using Jive # Mock @mockup -using Test -module Goods -struct Foo -end -function f(::Foo) - 10 -end -function g(::Foo) - 10 -end -end # module Goods +# `@__END__` +`throw(Jive.EndError())` -@mockup module Goods -function f(::Foo) - 20 -end -end # @mockup module Goods -@test Goods.f(Goods.Foo()) == 10 -@test Mock.Goods.f(Mock.Goods.Foo()) == 20 -@test Mock.Goods.g(Mock.Goods.Foo()) == 10 +* [`test/jive/__END__`](https://github.com/wookay/Jive.jl/blob/master/test/jive/__END__) - -Goods3 = @mockup module Goods -function g(::Foo) - 30 -end -end # @mockup module Goods -@test Goods.f(Goods.Foo()) == 10 -@test Mock.Goods.f(Mock.Goods.Foo()) == 10 -@test Mock.Goods.g(Mock.Goods.Foo()) == 30 -@test Goods3 isa Module -@test Goods3.g === Mock.Goods.g +```julia +using Jive +@__END__ ``` diff --git a/docs/src/index.md b/docs/src/index.md index f9cf23a..f88c52b 100644 --- a/docs/src/index.md +++ b/docs/src/index.md @@ -2,13 +2,14 @@ `Jive.jl` is a Julia package to help the writing tests. - - [runtests](#runtests) - - [watch](#watch) - - [@skip](#skip) - - [@onlyonce](#onlyonce) - - [@If](#If) - - [@useinside](#useinside) - - [@mockup](#mockup) + - [runtests](#runtests-1) + - [watch](#watch-1) + - [@skip](#@skip-1) + - [@onlyonce](#@onlyonce-1) + - [@If](#@If-1) + - [@useinside](#@useinside-1) + - [@mockup](#@mockup-1) + - [`@__END__`](#@__END__-1) # runtests @@ -162,40 +163,14 @@ used to produce a replica from the other module. * [test/jive/mockup](https://github.com/wookay/Jive.jl/blob/master/test/jive/mockup) -```julia -using Jive # Mock @mockup -using Test -module Goods -struct Foo -end -function f(::Foo) - 10 -end -function g(::Foo) - 10 -end -end # module Goods +# `@__END__` +`throw(Jive.EndError())` -@mockup module Goods -function f(::Foo) - 20 -end -end # @mockup module Goods -@test Goods.f(Goods.Foo()) == 10 -@test Mock.Goods.f(Mock.Goods.Foo()) == 20 -@test Mock.Goods.g(Mock.Goods.Foo()) == 10 +* [`test/jive/__END__`](https://github.com/wookay/Jive.jl/blob/master/test/jive/__END__) - -Goods3 = @mockup module Goods -function g(::Foo) - 30 -end -end # @mockup module Goods -@test Goods.f(Goods.Foo()) == 10 -@test Mock.Goods.f(Mock.Goods.Foo()) == 10 -@test Mock.Goods.g(Mock.Goods.Foo()) == 30 -@test Goods3 isa Module -@test Goods3.g === Mock.Goods.g +```julia +using Jive +@__END__ ```