-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #76 from timholy/teh/ji0.7
Fix on recent Julia & Revise versions
- Loading branch information
Showing
15 changed files
with
138 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ os: | |
- osx | ||
julia: | ||
- 1.0 | ||
- 1.1 | ||
- 1 | ||
- nightly | ||
notifications: | ||
email: false | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# From base, but copied here to make sure we don't fail bacause base changed | ||
function my_gcd(a::T, b::T) where T<:Union{Int8,UInt8,Int16,UInt16,Int32,UInt32, | ||
Int64,UInt64,Int128,UInt128} | ||
a == 0 && return abs(b) | ||
b == 0 && return abs(a) | ||
za = trailing_zeros(a) | ||
zb = trailing_zeros(b) | ||
k = min(za, zb) | ||
u = unsigned(abs(a >> za)) | ||
v = unsigned(abs(b >> zb)) | ||
while u != v | ||
if u > v | ||
u, v = v, u | ||
end | ||
v -= u | ||
v >>= trailing_zeros(v) | ||
end | ||
r = u << k | ||
# T(r) would throw InexactError; we want OverflowError instead | ||
r > typemax(T) && throw(OverflowError("gcd($a, $b) overflows")) | ||
r % T | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,11 @@ | ||
using Rebugger, Test | ||
|
||
@info "These tests manipulate the console. Wait until you see \"Done\"" | ||
include("edit.jl") | ||
include("interpret.jl") | ||
if Sys.isunix() && VERSION >= v"1.1.0" | ||
include("interpret_ui.jl") | ||
else | ||
@warn "Skipping UI tests" | ||
end | ||
println("done") # there is so much terminal manipulation, best to let the user know | ||
println("Done") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
++++++++++++++++++++++++++++++++++++++++++++++++++ | ||
|my_gcd(10, 20) | ||
|my_gcd(a::T, b::T) where T<:Union{Int128, Int16, Int32, Int64, Int8, UInt128, UI | ||
|nt16, UInt32, UInt64, UInt8} in Main at /home/tim/.julia/dev/Rebugger/test/my_gc | ||
|d.jl:4 | ||
| a = 10 | ||
| b = 20 | ||
| T = Int64 | ||
| 3 function my_gcd(a::T, b::T) where T <: Union{Int8, UInt8, Int16, UInt16, … | ||
| 4 a == 0 && return abs(b) | ||
| 5 b == 0 && return abs(a) | ||
| 6 za = trailing_zeros(a) | ||
| | ||
-------------------------------------------------- | ||
|AAAAAAAAAAAAAA | ||
|AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA | ||
|AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA | ||
|AAAAAA | ||
|AAAAAAAA | ||
|AAAAAAAA | ||
|AAAAAAAAAAA | ||
|AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA | ||
|AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA | ||
|AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA | ||
|AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA | ||
| |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
++++++++++++++++++++++++++++++++++++++++++++++++++ | ||
|__gcdval__ = my_gcd(10, 20); | ||
|my_gcd(a::T, b::T) where T<:Union{Int128, Int16, Int32, Int64, Int8, UInt128, UI | ||
|nt16, UInt32, UInt64, UInt8} in Main at /home/tim/.julia/dev/Rebugger/test/my_gc | ||
|d.jl:4 | ||
| a = 10 | ||
| b = 20 | ||
| T = Int64 | ||
| 3 function my_gcd(a::T, b::T) where T <: Union{Int8, UInt8, Int16, UInt16, … | ||
| 4 a == 0 && return abs(b) | ||
| 5 b == 0 && return abs(a) | ||
| 6 za = trailing_zeros(a) | ||
| | ||
-------------------------------------------------- | ||
|AAAAAAAAAAAAAAAAAAAAAAAAAAAA | ||
|AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA | ||
|AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA | ||
|AAAAAA | ||
|AAAAAAAA | ||
|AAAAAAAA | ||
|AAAAAAAAAAA | ||
|AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA | ||
|AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA | ||
|AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA | ||
|AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA | ||
| |