Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Functions
bazel_test.cpp File Reference
#include "include/core/SkCanvas.h"
#include "include/core/SkRect.h"
#include "include/core/SkTypes.h"
#include "include/svg/SkSVGCanvas.h"
#include "png.h"
#include <stdio.h>
#include <ctime>
#include <iostream>

Go to the source code of this file.

Functions

void print_localtime ()
 
int main (int argc, char **argv)
 

Function Documentation

◆ main()

int main ( int  argc,
char **  argv 
)

Definition at line 20 of file bazel_test.cpp.

20 {
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()
static std::unique_ptr< SkCanvas > Make(const SkRect &bounds, SkWStream *, uint32_t flags=0)
std::string printf(const char *fmt,...) SK_PRINTF_LIKE(1

◆ print_localtime()

void print_localtime ( )

Definition at line 15 of file bazel_test.cpp.

15 {
16 std::time_t result = std::time(nullptr);
17 std::cout << std::asctime(std::localtime(&result));
18}
GAsyncResult * result