MCPcopy Create free account
hub / github.com/apache/trafficserver / TEST

Function TEST

lib/yamlcpp/test/binary_test.cpp:4–8  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2#include <yaml-cpp/binary.h>
3
4TEST(BinaryTest, DecodingSimple) {
5 std::string input{90, 71, 86, 104, 90, 71, 74, 108, 90, 87, 89, 61};
6 const std::vector<unsigned char> &result = YAML::DecodeBase64(input);
7 EXPECT_EQ(std::string(result.begin(), result.end()), "deadbeef");
8}
9
10TEST(BinaryTest, DecodingNoCrashOnNegative) {
11 std::string input{-58, -1, -99, 109};

Callers

nothing calls this directly

Calls 5

DecodeBase64Function · 0.85
stringClass · 0.85
beginMethod · 0.45
endMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected