Flutter Engine
The Flutter Engine
bazel_test.cpp
Go to the documentation of this file.
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
8
9#include "png.h"
10
11#include <stdio.h>
12#include <ctime>
13#include <iostream>
14
16 std::time_t result = std::time(nullptr);
17 std::cout << std::asctime(std::localtime(&result));
18}
19
20int main(int argc, char** argv) {
21 SkDebugf("Hello world\n");
23 // https://docs.bazel.build/versions/main/test-encyclopedia.html#role-of-the-test-runner
24 if (png_access_version_number() == 10638) {
25 printf("PASS\n"); // This tells the human the test passed.
26 return 0; // This tells Bazel the test passed.
27 }
28 if (argc < -10) {
29 std::unique_ptr<SkCanvas> not_used = SkSVGCanvas::Make({}, nullptr, 0);
30 not_used->save();
31 }
32 printf("FAIL\n"); // This tells the human the test failed.
33 return 1; // This tells Bazel the test failed.
34}
void SK_SPI SkDebugf(const char format[],...) SK_PRINTF_LIKE(1
void print_localtime()
Definition: bazel_test.cpp:15
int main(int argc, char **argv)
Definition: bazel_test.cpp:20
static std::unique_ptr< SkCanvas > Make(const SkRect &bounds, SkWStream *, uint32_t flags=0)
Definition: SkSVGCanvas.cpp:19
GAsyncResult * result
char ** argv
Definition: library.h:9
std::string printf(const char *fmt,...) SK_PRINTF_LIKE(1
Definition: SkSLString.cpp:83
static double time(int loops, Benchmark *bench, Target *target)
Definition: nanobench.cpp:394