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