blob: 6f7e34c397999ef7950d565fa54d93b819a64fc2 [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=9 x=0 y=9 r=0.40
# Scroll d=27 x=0 y=27 r=0.36
# Fling d=0 x=0 y=0 r=0.00
def Validate(raw, events, gestures):
fuzzy = FuzzyCheck()
fuzzy.expected = [
MotionValidator("== 0 ~ 10"),
ScrollValidator(">= 27", merge=True),
]
fuzzy.unexpected = [
FlingValidator(),
FlingStopValidator("<10"),
]
return fuzzy.Check(gestures)