Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
third_party
skia
experimental
bazel_test
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
4
#include "
include/core/SkCanvas.h
"
5
#include "
include/core/SkRect.h
"
6
#include "
include/core/SkTypes.h
"
7
#include "
include/svg/SkSVGCanvas.h
"
8
9
#include "png.h"
10
11
#include <
stdio.h
>
12
#include <ctime>
13
#include <iostream>
14
15
void
print_localtime
() {
16
std::time_t
result
= std::time(
nullptr
);
17
std::cout << std::asctime(std::localtime(&
result
));
18
}
19
20
int
main
(
int
argc,
char
** argv) {
21
SkDebugf
(
"Hello world\n"
);
22
print_localtime
();
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
}
SkCanvas.h
SkDebugf
void SK_SPI SkDebugf(const char format[],...) SK_PRINTF_LIKE(1
SkRect.h
SkSVGCanvas.h
SkTypes.h
print_localtime
void print_localtime()
Definition
bazel_test.cpp:15
SkSVGCanvas::Make
static std::unique_ptr< SkCanvas > Make(const SkRect &bounds, SkWStream *, uint32_t flags=0)
Definition
SkSVGCanvas.cpp:19
result
GAsyncResult * result
Definition
fl_text_input_plugin.cc:106
main
Definition
main.py:1
stdio.h
Generated on Fri Apr 26 2024 06:15:58 for Flutter Engine by
1.9.8