summaryrefslogtreecommitdiff
path: root/cros_ec/test/ec_keyboard_test.c
diff options
context:
space:
mode:
Diffstat (limited to 'cros_ec/test/ec_keyboard_test.c')
-rw-r--r--cros_ec/test/ec_keyboard_test.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/cros_ec/test/ec_keyboard_test.c b/cros_ec/test/ec_keyboard_test.c
new file mode 100644
index 0000000000..bcdb83cc6d
--- /dev/null
+++ b/cros_ec/test/ec_keyboard_test.c
@@ -0,0 +1,31 @@
+/* Copyright (c) 2011 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.
+ *
+ * Testing code. Running at Linux environment.
+ */
+#include "cros_ec/include/ec_common.h"
+#include "cros_ec/include/core.h"
+#include "cros_ec/chip_stub/keyboard.h"
+
+
+int run_test_cases() {
+ /* Just a simple test */
+ SimulateKeyStateChange(2, 3, 1);
+ /* Expect KeyboardStateChanged() in cros_ec/keyboard.c shows something. */
+
+ return 0;
+}
+
+
+int main(int argc, char **argv) {
+
+ EcError ret;
+
+ /* Call Google EC core initial code. */
+ ret = CoreMain();
+ if (ret != EC_SUCCESS)
+ return 1;
+
+ return run_test_cases();
+}