mirror of
https://github.com/bolero-MURAKAMI/Sprout.git
synced 2025-07-16 15:14:13 +00:00
fix hash test
This commit is contained in:
parent
5df05cf750
commit
9140b68379
11 changed files with 157 additions and 48 deletions
|
@ -221,8 +221,12 @@ namespace testspr {
|
|||
TESTSPR_BOTH_ASSERT(sprout::tuples::is_tuple<decltype(tup1)>::value);
|
||||
TESTSPR_BOTH_ASSERT(!sprout::tuples::is_tuple<int>::value);
|
||||
|
||||
// hash_value
|
||||
TESTSPR_BOTH_ASSERT((hash_value(sprout::tuples::tuple<int, int>(1, 2)) != 0));
|
||||
// sprout::to_hash, sprout::hash
|
||||
{
|
||||
typedef sprout::tuples::tuple<int, int> type;
|
||||
TESTSPR_BOTH_ASSERT(sprout::to_hash(type(1, 2)) == sprout::hash<type>()(type(1, 2)));
|
||||
TESTSPR_BOTH_ASSERT(sprout::to_hash(type(1, 2)) != sprout::to_hash(type()));
|
||||
}
|
||||
}
|
||||
}
|
||||
} // namespace testspr
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue