• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2020 Google LLC.
2 // Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
3 #include <png.h>
4 #include <ctime>
5 #include <iostream>
6 
7 #include "include/core/SkTypes.h"
8 
print_localtime()9 void print_localtime() {
10     std::time_t result = std::time(nullptr);
11     std::cout << std::asctime(std::localtime(&result));
12 }
13 
main(int argc,char ** argv)14 int main(int argc, char** argv) {
15     SkDebugf("Hello world\n");
16     print_localtime();
17     // https://docs.bazel.build/versions/main/test-encyclopedia.html#role-of-the-test-runner
18     if (png_access_version_number() == 10638) {
19         printf("PASS\n"); // This tells the human the test passed.
20         return 0; // This tells Bazel the test passed.
21     }
22     printf("FAIL\n"); // This tells the human the test failed.
23     return 1; // This tells Bazel the test failed.
24 }
25