Flutter Engine
The Flutter Engine
fml
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
ASSERT_EQ(
HashCombine
(),
HashCombine
());
14
ASSERT_EQ(
HashCombine
(
"Hello"
),
HashCombine
(
"Hello"
));
15
ASSERT_NE(
HashCombine
(
"Hello"
),
HashCombine
(
"World"
));
16
ASSERT_EQ(
HashCombine
(
"Hello"
,
"World"
),
HashCombine
(
"Hello"
,
"World"
));
17
ASSERT_NE(
HashCombine
(
"World"
,
"Hello"
),
HashCombine
(
"Hello"
,
"World"
));
18
ASSERT_EQ(
HashCombine
(12u),
HashCombine
(12u));
19
ASSERT_NE(
HashCombine
(12u),
HashCombine
(12.0f));
20
ASSERT_EQ(
HashCombine
(
'a'
),
HashCombine
(
'a'
));
21
}
22
23
}
// namespace testing
24
}
// namespace fml
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
Generated on Sun Jun 23 2024 21:54:58 for Flutter Engine by
1.9.4