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

Function TEST

tests/traits/NlohmannTest.cpp:5–15  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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