Upstream version 9.38.198.0
[platform/framework/web/crosswalk.git] / src / native_client / tests / syscalls / test.cc
1 /*
2  * Copyright 2010 The Native Client Authors. All rights reserved.
3  * Use of this source code is governed by a BSD-style license that can be
4  * found in the LICENSE file.
5  */
6
7 #include "native_client/tests/syscalls/test.h"
8
9 #include <cstdio>
10
11 bool test::Failed(const char *testname,
12             const char *msg,
13             const char* file_name,
14             int line) {
15   if (0 == file_name) {
16     file_name = "UNKNOWN";
17   }
18   std::printf("TEST FAILED: %s: %s at %s:%d\n",
19               testname,
20               msg,
21               file_name,
22               line);
23   return false;
24 }
25
26 bool test::Passed(const char *testname, const char *msg) {
27   printf("TEST PASSED: %s: %s\n", testname, msg);
28   return true;
29 }