Skip to content

Commit

Permalink
First of long slog to get package up to date
Browse files Browse the repository at this point in the history
  • Loading branch information
pkalikman committed Nov 11, 2020
1 parent 579dd92 commit 131d995
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 5 deletions.
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The Checkers.jl package is licensed under the MIT "Expat" License:

> Copyright (c) 2017: Efim Abrikosov & Philip Kalikman.
> Copyright (c) 2017, 2018, 2019, 2020: Efim Abrikosov & Philip Kalikman.
>
> Permission is hereby granted, free of charge, to any person obtaining a copy
> of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 2 additions & 0 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
name = "Checkers"
uuid = "700e45bd-7bf5-5563-bdb4-6e688fe06d37"
2 changes: 0 additions & 2 deletions REQUIRE

This file was deleted.

1 change: 0 additions & 1 deletion docs/src/LICENSE.md

This file was deleted.

22 changes: 22 additions & 0 deletions docs/src/LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
The Checkers.jl package is licensed under the MIT "Expat" License:

> Copyright (c) 2016: Efim Abrikosov & Philip Kalikman.
>
> Permission is hereby granted, free of charge, to any person obtaining a copy
> of this software and associated documentation files (the "Software"), to deal
> in the Software without restriction, including without limitation the rights
> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
> copies of the Software, and to permit persons to whom the Software is
> furnished to do so, subject to the following conditions:
>
> The above copyright notice and this permission notice shall be included in all
> copies or substantial portions of the Software.
>
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
> SOFTWARE.
>
13 changes: 12 additions & 1 deletion src/test-forall.jl
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,16 @@ macro test_forall(factex::Expr)
val = p.args[3]
push!(iterate.args,:($(esc(key))=$(esc(val))))
end
last_value = nothing
prop =
quote
#Why on Earth does this work?
#Is there a clearer way to express this?
last_value = $(esc(factex.args[end].args[2].args[2]))
res = res && $(esc(factex.args[end]))
if !res
fail_data = $(esc(factex.args[end]))
more_data = $(esc(last_value))
break
end
end
Expand All @@ -100,13 +105,19 @@ macro test_forall(factex::Expr)
quote
res = true
fail_data = false
more_data = false
result =
try
$ex
if res
@show 1
Pass(:test,$(Expr(:quote, factex)), nothing, nothing)
else
Fail(:test,$(Expr(:quote, factex)), fail_data, nothing)
@show 2
@show fail_data
@show more_data
Fail(:test,$(Expr(:quote, factex)), [fail_data, more_data],
nothing)
end
catch err
Error(:test_error,$(Expr(:quote, factex)), err, catch_backtrace())
Expand Down

0 comments on commit 131d995

Please sign in to comment.