Flutter Engine
 
Loading...
Searching...
No Matches
hash_combine_unittests.cc
Go to the documentation of this file.
1// Copyright 2013 The Flutter Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
6
8
9namespace fml {
10namespace testing {
11
12TEST(HashCombineTest, CanHash) {
13 std::string hello("Hello");
14 std::string world("World");
15 ASSERT_EQ(HashCombine(), HashCombine());
16 ASSERT_EQ(HashCombine(hello), HashCombine(hello));
17 ASSERT_NE(HashCombine(hello), HashCombine(world));
18 ASSERT_EQ(HashCombine(hello, world), HashCombine(hello, world));
19 ASSERT_NE(HashCombine(world, hello), HashCombine(hello, world));
20 ASSERT_EQ(HashCombine(12u), HashCombine(12u));
21 ASSERT_NE(HashCombine(12u), HashCombine(12.0f));
22 ASSERT_EQ(HashCombine('a'), HashCombine('a'));
23}
24
25} // namespace testing
26} // namespace fml
TEST(BacktraceTest, CanGatherBacktrace)
constexpr std::size_t HashCombine()