Skip to content

Commit

Permalink
[c++] Fix typo in test/unit_soma_dense_ndarray.cc
Browse files Browse the repository at this point in the history
  • Loading branch information
johnkerl committed Aug 17, 2024
1 parent bdba3c3 commit d6582ff
Showing 1 changed file with 29 additions and 2 deletions.
31 changes: 29 additions & 2 deletions libtiledbsoma/test/unit_soma_dense_ndarray.cc
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,20 @@ TEST_CASE("SOMADenseNDArray: basic") {
auto soma_dense = SOMADenseNDArray::open(uri, OpenMode::read, ctx);
REQUIRE(soma_dense->uri() == uri);
REQUIRE(soma_dense->ctx() == ctx);
REQUIRE(soma_dense->type() == "SOMADenseNDArray");

std::cout << "\n";
std::cout << "\n";
std::cout << "1. HELLO\n";
std::cout << "1. SPARSE FLAG " << (soma_dense->is_sparse()) << "\n";
std::cout << "\n";
std::cout << "1. TYPE? " << (soma_dense->type().has_value()) << "\n";
std::cout << "1. TYPE! " << (soma_dense->type().value()) << "\n";
std::cout << "\n";
std::cout << "\n";

REQUIRE(soma_dense->type().has_value());
REQUIRE(soma_dense->type().value() == "SOMADenseNDArray");

REQUIRE(soma_dense->is_sparse() == false);
REQUIRE(soma_dense->soma_data_type() == "l");
auto schema = soma_dense->tiledb_schema();
Expand Down Expand Up @@ -118,7 +131,7 @@ TEST_CASE("SOMADenseNDArray: metadata") {
std::string uri = "mem://unit-test-dense-ndarray";

auto index_columns = helper::create_column_index_info();
SOMASparseNDArray::create(
SOMADenseNDArray::create(
uri,
"l",
ArrowTable(
Expand All @@ -135,6 +148,20 @@ TEST_CASE("SOMADenseNDArray: metadata") {
ResultOrder::automatic,
std::pair<uint64_t, uint64_t>(1, 1));

std::cout << "\n";
std::cout << "\n";
std::cout << "2.HELLO\n";
std::cout << "2.SPARSE FLAG " << (soma_dense->is_sparse()) << "\n";
std::cout << "\n";
std::cout << "2.TYPE? " << (soma_dense->type().has_value()) << "\n";
std::cout << "2.TYPE! " << (soma_dense->type().value()) << "\n";
std::cout << "\n";
std::cout << "\n";

REQUIRE(soma_dense->is_sparse() == false);
REQUIRE(soma_dense->type().has_value());
REQUIRE(soma_dense->type().value() == "SOMADenseNDArray");

int32_t val = 100;
soma_dense->set_metadata("md", TILEDB_INT32, 1, &val);
soma_dense->close();
Expand Down

0 comments on commit d6582ff

Please sign in to comment.