-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
213 additions
and
11 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
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,50 @@ | ||
include("CellValuesMocks.jl") | ||
include("MapsMocks.jl") | ||
include("../src/CellMapOperations.jl") | ||
module CellMapOperationsTests | ||
|
||
using Test | ||
using CellwiseValues | ||
using TensorValues | ||
|
||
using ..CellValuesMocks | ||
using ..MapsMocks | ||
|
||
l = 10 | ||
|
||
a = VectorValue(10,10) | ||
b = VectorValue(15,20) | ||
p1 = VectorValue(1,1) | ||
p2 = VectorValue(2,2) | ||
p3 = VectorValue(3,3) | ||
p = [p1,p2,p3] | ||
m = MockMap(a) | ||
r = evaluate(m,p) | ||
|
||
cm = TestIterCellValue(m,l) | ||
cp = TestIterCellValue(p,l) | ||
rm = [ CachedArray(r) for i in 1:l] | ||
|
||
test_iter_cell_map(cm,cp,rm) | ||
|
||
cm2 = apply(-,cm,broadcast=true) | ||
rm = [ CachedArray(-r) for i in 1:l] | ||
|
||
@test length(cm2) == length(cm) | ||
@test length(cm2) == length(rm) | ||
|
||
test_iter_cell_map(cm2,cp,rm) | ||
|
||
|
||
|
||
cm = TestIndexCellValue(m,l) | ||
cp = TestIndexCellValue(p,l) | ||
rm = [ CachedArray(r) for i in 1:l] | ||
|
||
test_index_cell_map_with_index_arg(cm,cp,rm) | ||
|
||
ca2 = evaluate(cm,cp) | ||
|
||
test_index_cell_array(ca2,rm) | ||
|
||
end # module CellMapOperationsTests |
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,31 @@ | ||
module CellMapsTests | ||
|
||
using Test | ||
using CellwiseValues | ||
using TensorValues | ||
|
||
using ..CellValuesMocks | ||
using ..MapsMocks | ||
|
||
l = 10 | ||
|
||
a = VectorValue(10,10) | ||
b = VectorValue(15,20) | ||
p1 = VectorValue(1,1) | ||
p2 = VectorValue(2,2) | ||
p3 = VectorValue(3,3) | ||
p = [p1,p2,p3] | ||
m = MockMap(a) | ||
r = evaluate(m,p) | ||
|
||
cm = TestIterCellValue(m,l) | ||
cp = TestIterCellValue(p,l) | ||
rm = [ CachedArray(r) for i in 1:l] | ||
test_iter_cell_map(cm,cp,rm) | ||
|
||
cm = TestIndexCellValue(m,l) | ||
cp = TestIndexCellValue(p,l) | ||
rm = [ CachedArray(r) for i in 1:l] | ||
test_index_cell_map_with_index_arg(cm,cp,rm) | ||
|
||
end # module CellMapsTests |
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