Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Functions
hex_codec_unittest.cc File Reference
#include "flutter/fml/hex_codec.h"
#include <iostream>
#include "gtest/gtest.h"

Go to the source code of this file.

Functions

 TEST (HexCodecTest, CanEncode)
 

Function Documentation

◆ TEST()

TEST ( HexCodecTest  ,
CanEncode   
)

Definition at line 11 of file hex_codec_unittest.cc.

11 {
12 {
13 auto result = fml::HexEncode("hello");
14 ASSERT_EQ(result, "68656c6c6f");
15 }
16
17 {
18 auto result = fml::HexEncode("");
19 ASSERT_EQ(result, "");
20 }
21
22 {
23 auto result = fml::HexEncode("1");
24 ASSERT_EQ(result, "31");
25 }
26
27 {
28 auto result = fml::HexEncode(std::string_view("\xFF\xFE\x00\x01", 4));
29 ASSERT_EQ(result, "fffe0001");
30 }
31}
GAsyncResult * result
std::string HexEncode(std::string_view input)
Definition hex_codec.cc:14