Skip to content

Commit

Permalink
Merge pull request #46 from JuliaOpt/od/empty_sums
Browse files Browse the repository at this point in the history
Fix empty sums test
  • Loading branch information
blegat committed Apr 4, 2020
2 parents da1a437 + 2096349 commit 407a8fd
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
3 changes: 2 additions & 1 deletion Project.toml
@@ -1,14 +1,15 @@
name = "MutableArithmetics"
uuid = "d8a4904e-b15c-11e9-3269-09a3773c0cb0"
authors = ["Gilles Peiffer", "Benoît Legat", "Sascha Timme"]
version = "0.2.8"
version = "0.2.9"

[deps]
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[compat]
OffsetArrays = "1"
julia = "1"

[extras]
Expand Down
12 changes: 6 additions & 6 deletions src/Test/scalar.jl
Expand Up @@ -32,13 +32,13 @@ function empty_sum_test(x)
#@test MA.isequal_canonical(MA.@rewrite(x .+ sum(1 for i in 1:0) * sum(x for i in 1:0)), x)
#@test MA.isequal_canonical(MA.@rewrite(x .+ 1^2 * sum(1 for i in 1:0) * sum(x for i in 1:0) * 1^2), x)
@test MA.isequal_canonical(MA.@rewrite(x .+ sum(1 for i in 1:0)), x)
@test MA.isequal_canonical(MA.@rewrite(x .+ sum(1 for i in 1:0)) * 1^2, x)
@test MA.isequal_canonical(MA.@rewrite(sum(1 for i in 1:0)) .+ x, x)
@test MA.isequal_canonical(MA.@rewrite(sum(1 for i in 1:0)) * 1^2 .+ x, x)
@test_broken MA.isequal_canonical(MA.@rewrite(x .+ sum(1 for i in 1:0) * 1^2), x + 0)
@test MA.isequal_canonical(MA.@rewrite(sum(1 for i in 1:0) .+ x), x)
@test MA.isequal_canonical(MA.@rewrite(sum(1 for i in 1:0) * 1^2 .+ x), x)
@test MA.isequal_canonical(MA.@rewrite(x .- sum(1 for i in 1:0)), x)
@test MA.isequal_canonical(MA.@rewrite(x .- sum(1 for i in 1:0)) * 1^2, x)
@test MA.isequal_canonical(MA.@rewrite(sum(1 for i in 1:0)) .- x, -x)
@test MA.isequal_canonical(MA.@rewrite(sum(1 for i in 1:0)) * 1^2 .- x, -x)
@test_broken MA.isequal_canonical(MA.@rewrite(x .- sum(1 for i in 1:0) * 1^2), x)
@test MA.isequal_canonical(MA.@rewrite(sum(1 for i in 1:0) .- x), -x)
@test MA.isequal_canonical(MA.@rewrite(sum(1 for i in 1:0) * 1^2 .- x), -x)
end

function cube_test(x)
Expand Down

2 comments on commit 407a8fd

@blegat
Copy link
Member Author

@blegat blegat commented on 407a8fd Apr 5, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator register()

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/12274

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.2.9 -m "<description of version>" 407a8fdfb5ef1810f3785a88e490291d37b9fb03
git push origin v0.2.9

Please sign in to comment.