mirror of
https://github.com/bolero-MURAKAMI/Sprout.git
synced 2024-12-23 21:25:49 +00:00
fix hash test
This commit is contained in:
parent
7aa10d1e08
commit
70b94395d5
2 changed files with 4 additions and 10 deletions
|
@ -222,11 +222,8 @@ namespace testspr {
|
|||
TESTSPR_BOTH_ASSERT(!sprout::tuples::is_tuple<int>::value);
|
||||
|
||||
// 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()));
|
||||
}
|
||||
TESTSPR_BOTH_ASSERT(sprout::to_hash(tup1) == sprout::hash<decltype(tup1)>()(tup1));
|
||||
TESTSPR_BOTH_ASSERT(sprout::to_hash(tup1) != sprout::to_hash(sprout::tuples::tuple<int, double>()));
|
||||
}
|
||||
}
|
||||
} // namespace testspr
|
||||
|
|
|
@ -219,11 +219,8 @@ namespace testspr {
|
|||
TESTSPR_BOTH_ASSERT(!sprout::is_variant<int>::value);
|
||||
|
||||
// sprout::to_hash, sprout::hash
|
||||
{
|
||||
typedef sprout::variant<int, char> type;
|
||||
TESTSPR_BOTH_ASSERT(sprout::to_hash(type(1)) == sprout::hash<type>()(type(1)));
|
||||
TESTSPR_BOTH_ASSERT(sprout::to_hash(type(1)) != sprout::to_hash(type()));
|
||||
}
|
||||
TESTSPR_BOTH_ASSERT(sprout::to_hash(var1) == sprout::hash<decltype(var1)>()(var1));
|
||||
TESTSPR_BOTH_ASSERT(sprout::to_hash(var1) != sprout::to_hash(sprout::variant<int, double>()));
|
||||
}
|
||||
}
|
||||
} // namespace testspr
|
||||
|
|
Loading…
Reference in a new issue