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
5
#include "
flutter/fml/hash_combine.h
"
6
7
#include "
flutter/testing/testing.h
"
8
9
namespace
fml
{
10
namespace
testing {
11
12
TEST
(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
hash_combine.h
fml::testing::TEST
TEST(BacktraceTest, CanGatherBacktrace)
Definition
backtrace_unittests.cc:13
fml
Definition
ascii_trie.cc:9
fml::HashCombine
constexpr std::size_t HashCombine()
Definition
hash_combine.h:25
testing.h
fml
hash_combine_unittests.cc
Generated on Thu Nov 6 2025 16:11:22 for Flutter Engine by
1.9.8