Skip to content

Commit

Permalink
add print tests for issue #65
Browse files Browse the repository at this point in the history
  • Loading branch information
josephjaspers committed Apr 29, 2020
1 parent 09501fc commit 7d5c0cf
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion blackcat/tensors/expression_base.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class Expression_Base: public ExpressionTemplate
Expression_Base(ExpressionTemplate&& et): ExpressionTemplate(std::move(et)) {}

//Expressions only support element-wise iteration
//Tensors support column and cwise iteration
//Tensors support column and element-wise iteration
BC_ITERATOR_DEF(cw_, cw_iterator_type, cw_begin, cw_end)
BC_ITERATOR_DEF(cw_reverse_, cw_reverse_iterator_type, cw_rbegin, cw_rend)
BC_FORWARD_ITER(cw_, begin, this->expression_template())
Expand Down
5 changes: 5 additions & 0 deletions tests/test_accessors.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@ int test_accessors(int sz=128) {
x.print();
y.print();
s.print();

//test expression_templates print functions
(x+x).print();
(x*x).print();
(x*x).print_sparse();
};

//Get rid of unused variable warning
Expand Down
2 changes: 0 additions & 2 deletions tests/test_constructors.h
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,6 @@ int test_constructors(int sz=128) {
bool ensure_diff = a.data() != original_ptr;
bool ensure_swap_dims = true;

bc::print(ensure_move, ensure_diff, ensure_swap_dims);

return ensure_move &&
ensure_diff &&
ensure_swap_dims;
Expand Down

0 comments on commit 7d5c0cf

Please sign in to comment.