Flutter Engine
Loading...
Searching...
No Matches
assertions.h
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
#ifndef FLUTTER_TESTING_ASSERTIONS_H_
6
#define FLUTTER_TESTING_ASSERTIONS_H_
7
8
#include <type_traits>
9
10
namespace
flutter::testing
{
11
12
inline
bool
NumberNear
(
double
a,
double
b) {
13
static
const
double
epsilon = 1e-3;
14
return
(a > (b - epsilon)) && (a < (b + epsilon));
15
}
16
17
}
// namespace flutter::testing
18
19
#endif
// FLUTTER_TESTING_ASSERTIONS_H_
flutter::testing
Definition
native_assets_unittests.cc:10
flutter::testing::NumberNear
bool NumberNear(double a, double b)
Definition
assertions.h:12
testing
assertions.h
Generated on Thu Nov 6 2025 16:11:29 for Flutter Engine by
1.9.8