Flutter Engine
The Flutter Engine
testing
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
{
11
namespace
testing {
12
13
inline
bool
NumberNear
(
double
a
,
double
b
) {
14
static
const
double
epsilon = 1
e
-3;
15
return
(
a
> (
b
- epsilon)) && (
a
< (
b
+ epsilon));
16
}
17
18
}
// namespace testing
19
}
// namespace flutter
20
21
#endif
// FLUTTER_TESTING_ASSERTIONS_H_
b
static bool b
Definition:
ffi_native_test_module.c:74
a
struct MyStruct a[10]
flutter::testing::NumberNear
bool NumberNear(double a, double b)
Definition:
assertions.h:13
flutter
Definition:
asset_manager.cc:10
protoc_wrapper.e
e
Definition:
protoc_wrapper.py:226
Generated on Sun Jun 23 2024 21:55:18 for Flutter Engine by
1.9.4