MCPcopy Create free account
hub / github.com/Thalhammer/jwt-cpp / TEST

Function TEST

tests/traits/BoostJsonTest.cpp:5–16  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3#include <gtest/gtest.h>
4
5TEST(BoostJsonTest, BasicClaims) {
6 const auto string = jwt::basic_claim<jwt::traits::boost_json>(jwt::traits::boost_json::string_type("string"));
7 ASSERT_EQ(string.get_type(), jwt::json::type::string);
8
9 const auto array =
10 jwt::basic_claim<jwt::traits::boost_json>(std::set<jwt::traits::boost_json::string_type>{"string", "string"});
11 ASSERT_EQ(array.get_type(), jwt::json::type::array);
12
13 jwt::traits::boost_json::value_type jvi = 159816816;
14 const auto integer = jwt::basic_claim<jwt::traits::boost_json>(jvi);
15 ASSERT_EQ(integer.get_type(), jwt::json::type::integer);
16}
17
18TEST(BoostJsonTest, AudienceAsString) {
19 jwt::traits::boost_json::string_type token =

Callers

nothing calls this directly

Calls 15

parseFunction · 0.85
hs256Class · 0.85
has_typeMethod · 0.80
has_content_typeMethod · 0.80
has_issuerMethod · 0.80
has_subjectMethod · 0.80
has_audienceMethod · 0.80
has_expires_atMethod · 0.80
has_not_beforeMethod · 0.80
has_issued_atMethod · 0.80
has_idMethod · 0.80
get_audienceMethod · 0.80

Tested by

no test coverage detected