Flutter Engine
The Flutter Engine
Toggle main menu visibility
Main Page
Related Pages
Modules
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
y
Enumerations
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
:
[
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
[
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
Enumerations
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerator
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
y
Properties
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
z
Related Functions
:
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
y
z
Files
File List
File Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Enumerations
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
v
w
y
Enumerator
b
c
d
e
f
g
h
k
l
m
n
p
r
s
t
u
v
w
Macros
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Modules
Pages
third_party
skia
modules
bentleyottmann
tests
PointTest.cpp
Go to the documentation of this file.
1
// Copyright 2023 Google LLC
2
// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
3
4
#include "
modules/bentleyottmann/include/Point.h
"
5
#include "
tests/Test.h
"
6
7
using namespace
bentleyottmann
;
8
9
DEF_TEST
(BO_PointBasic,
reporter
) {
10
{
11
Point
p0 = {0, 0};
12
Point
p1 = {0, 0};
13
REPORTER_ASSERT
(
reporter
, !(p0 < p1));
14
REPORTER_ASSERT
(
reporter
, !(p1 < p0));
15
REPORTER_ASSERT
(
reporter
, p0 == p1);
16
}
17
18
{
19
Point
p0 = {0, 0};
20
Point
p1 = {1, 1};
21
REPORTER_ASSERT
(
reporter
, p0 < p1);
22
REPORTER_ASSERT
(
reporter
, !(p1 < p0));
23
REPORTER_ASSERT
(
reporter
, p0 != p1);
24
}
25
26
{
27
// Same y different x.
28
Point
p0 = {0, 0};
29
Point
p1 = {1, 0};
30
REPORTER_ASSERT
(
reporter
, p0 < p1);
31
REPORTER_ASSERT
(
reporter
, !(p1 < p0));
32
REPORTER_ASSERT
(
reporter
, p0 != p1);
33
}
34
35
{
36
REPORTER_ASSERT
(
reporter
, !Point::DifferenceTooBig(Point::Smallest(),
Point
{0, 0}));
37
REPORTER_ASSERT
(
reporter
, !Point::DifferenceTooBig(Point::Largest(),
Point
{0, 0}));
38
REPORTER_ASSERT
(
reporter
, Point::DifferenceTooBig(
Point
{0, 0}, Point::Smallest()));
39
REPORTER_ASSERT
(
reporter
, !Point::DifferenceTooBig(
Point
{0, 0}, Point::Largest()));
40
REPORTER_ASSERT
(
reporter
, Point::DifferenceTooBig(Point::Smallest(), Point::Largest()));
41
REPORTER_ASSERT
(
reporter
, Point::DifferenceTooBig(Point::Largest(), Point::Smallest()));
42
REPORTER_ASSERT
(
reporter
,
43
!Point::DifferenceTooBig(Point::Smallest() +
Point
{1, 1},
Point
{0, 0}));
44
REPORTER_ASSERT
(
reporter
,
45
!Point::DifferenceTooBig(
Point
{0, 0}, Point::Smallest() +
Point
{1, 1}));
46
}
47
}
reporter
reporter
Definition:
FontMgrTest.cpp:39
Point.h
Test.h
REPORTER_ASSERT
#define REPORTER_ASSERT(r, cond,...)
Definition:
Test.h:286
DEF_TEST
DEF_TEST(BO_PointBasic, reporter)
Definition:
PointTest.cpp:9
bentleyottmann
Definition:
BentleyOttmann1.h:12
bentleyottmann::Point
Definition:
Point.h:10
Generated on Sun Jun 23 2024 21:56:04 for Flutter Engine by
1.9.4