#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();
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 },
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 },
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 },
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 },
int i;
double scale, oldscale;
double angle;
- int cardinals[8][2] = {
+ int cardinals[NCARDINALS][2] = {
{ 0, 30 },
{ 30, 30 },
{ 30, 0 },
int i;
double scale, oldscale;
double angle;
- int cardinals[8][2] = {
+ int cardinals[NCARDINALS][2] = {
{ 0, 30 },
{ 30, 30 },
{ 30, 0 },
int i;
double scale, oldscale;
double angle;
- int cardinals[8][2] = {
+ int cardinals[NCARDINALS][2] = {
{ 0, 30 },
{ 30, 30 },
{ 30, 0 },
int i;
double scale, oldscale;
double angle;
- int cardinals[8][2] = {
+ int cardinals[NCARDINALS][2] = {
{ 0, 30 },
{ 30, 30 },
{ 30, 0 },
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);