blob: ff579004a097bba576e24e1de9abdf5990777888 [file] [log] [blame]
# Copyright (c) 2012 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from fuzzy_check import FuzzyCheck
from validators import *
# originally generated gestures:
# FlingStop
# Motion d=26 x=2 y=25 r=0.15
# Scroll d=14 x=1 y=13 r=0.46
# Scroll d=1 x=0 y=1 r=0.00
def Validate(raw, events, gestures):
fuzzy = FuzzyCheck()
fuzzy.expected = [
MotionValidator("== 0 ~ 27"),
ScrollValidator(">= 14"),
]
fuzzy.unexpected = [
FlingStopValidator("<10"),
ScrollValidator(),
ScrollValidator(),
]
return fuzzy.Check(gestures)