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

Function TEST

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 15

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
valueMethod · 0.80

Tested by

no test coverage detected