Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
libinput
libinput
Commits
8f8ad0e3
Commit
8f8ad0e3
authored
Jun 20, 2019
by
Peter Hutterer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test: use an enum for the cardinals
Signed-off-by:
Peter Hutterer
<
peter.hutterer@who-t.net
>
parent
996270d1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
10 deletions
+13
-10
test/test-gestures.c
test/test-gestures.c
+13
-10
No files found.
test/test-gestures.c
View file @
8f8ad0e3
...
...
@@ -29,6 +29,10 @@
#include "libinput-util.h"
#include "litest.h"
enum
cardinal
{
N
,
NE
,
E
,
SE
,
S
,
SW
,
W
,
NW
,
NCARDINALS
};
START_TEST
(
gestures_cap
)
{
struct
litest_device
*
dev
=
litest_current_device
();
...
...
@@ -62,7 +66,7 @@ START_TEST(gestures_swipe_3fg)
double
dx
,
dy
;
int
cardinal
=
_i
;
/* ranged test */
double
dir_x
,
dir_y
;
int
cardinals
[
8
][
2
]
=
{
int
cardinals
[
NCARDINALS
][
2
]
=
{
{
0
,
30
},
{
30
,
30
},
{
30
,
0
},
...
...
@@ -161,7 +165,7 @@ START_TEST(gestures_swipe_3fg_btntool)
double
dx
,
dy
;
int
cardinal
=
_i
;
/* ranged test */
double
dir_x
,
dir_y
;
int
cardinals
[
8
][
2
]
=
{
int
cardinals
[
NCARDINALS
][
2
]
=
{
{
0
,
30
},
{
30
,
30
},
{
30
,
0
},
...
...
@@ -264,7 +268,7 @@ START_TEST(gestures_swipe_4fg)
double
dx
,
dy
;
int
cardinal
=
_i
;
/* ranged test */
double
dir_x
,
dir_y
;
int
cardinals
[
8
][
2
]
=
{
int
cardinals
[
NCARDINALS
][
2
]
=
{
{
0
,
3
},
{
3
,
3
},
{
3
,
0
},
...
...
@@ -391,7 +395,7 @@ START_TEST(gestures_swipe_4fg_btntool)
double
dx
,
dy
;
int
cardinal
=
_i
;
/* ranged test */
double
dir_x
,
dir_y
;
int
cardinals
[
8
][
2
]
=
{
int
cardinals
[
NCARDINALS
][
2
]
=
{
{
0
,
30
},
{
30
,
30
},
{
30
,
0
},
...
...
@@ -549,7 +553,7 @@ START_TEST(gestures_pinch)
int
i
;
double
scale
,
oldscale
;
double
angle
;
int
cardinals
[
8
][
2
]
=
{
int
cardinals
[
NCARDINALS
][
2
]
=
{
{
0
,
30
},
{
30
,
30
},
{
30
,
0
},
...
...
@@ -650,7 +654,7 @@ START_TEST(gestures_pinch_3fg)
int
i
;
double
scale
,
oldscale
;
double
angle
;
int
cardinals
[
8
][
2
]
=
{
int
cardinals
[
NCARDINALS
][
2
]
=
{
{
0
,
30
},
{
30
,
30
},
{
30
,
0
},
...
...
@@ -755,7 +759,7 @@ START_TEST(gestures_pinch_4fg)
int
i
;
double
scale
,
oldscale
;
double
angle
;
int
cardinals
[
8
][
2
]
=
{
int
cardinals
[
NCARDINALS
][
2
]
=
{
{
0
,
30
},
{
30
,
30
},
{
30
,
0
},
...
...
@@ -866,7 +870,7 @@ START_TEST(gestures_spread)
int
i
;
double
scale
,
oldscale
;
double
angle
;
int
cardinals
[
8
][
2
]
=
{
int
cardinals
[
NCARDINALS
][
2
]
=
{
{
0
,
30
},
{
30
,
30
},
{
30
,
0
},
...
...
@@ -1040,8 +1044,7 @@ END_TEST
TEST_COLLECTION
(
gestures
)
{
/* N, NE, ... */
struct
range
cardinals
=
{
0
,
8
};
struct
range
cardinals
=
{
N
,
N
+
NCARDINALS
};
struct
range
fingers
=
{
3
,
5
};
litest_add
(
"gestures:cap"
,
gestures_cap
,
LITEST_TOUCHPAD
,
LITEST_SINGLE_TOUCH
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment