Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update
Browse files Browse the repository at this point in the history
rusty1s committed Jan 13, 2025
1 parent 2ec1e7c commit 1c9d3e1
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions test/csrc/classes/test_hash_map.cpp
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
#include <ATen/ATen.h>
#include <gtest/gtest.h>

/* #include "pyg_lib/csrc/classes/hash_map.h" */
#include "pyg_lib/csrc/classes/hash_map.h"

TEST(HashMapTest, BasicAssertions) {
/* auto options = at::TensorOptions().dtype(at::kLong); */
/* auto key = at::tensor({0, 10, 30, 20}, options); */
auto options = at::TensorOptions().dtype(at::kLong);
auto key = at::tensor({0, 10, 30, 20}, options);

/* auto map = pyg::classes::HashMap(key); */
auto map = pyg::classes::HashMap(key);

/* auto query = at::tensor({30, 10, 20, 40}, options); */
/* auto expected = at::tensor({2, 1, 3, -1}, options); */
/* EXPECT_TRUE(at::equal(map.get(query), expected)); */
auto query = at::tensor({30, 10, 20, 40}, options);
auto expected = at::tensor({2, 1, 3, -1}, options);
EXPECT_TRUE(at::equal(map.get(query), expected));
}

0 comments on commit 1c9d3e1

Please sign in to comment.