Thalhammer / jwt-cpp

A header only library for creating and validating json web tokens in c++
https://thalhammer.github.io/jwt-cpp/
MIT License
828 stars 229 forks source link

Add using namespace jwt to unit tests #306

Closed sjanel closed 7 months ago

sjanel commented 11 months ago

All is in the title. No other change in this PR.

Thalhammer commented 11 months ago

Ok, but what's the benefit of doing this ? The tests aren't supposed to be included in other programs, so name clashes shouldn't be an issue.

sjanel commented 11 months ago

Benefits are readability, and removal of all prefixes of symbols accessed in jwt (removal of jwt::).

prince-chrismc commented 11 months ago

Benefits are readability, and removal of all prefixes of symbols accessed in jwt (removal of jwt::).

Why not just stick a using namespace at the top?

This seems very stylized and adds a lot of diff, why are you looking at the symbols of the test code? You are never going to link against it.

sjanel commented 11 months ago

I don't have a strong opinion on this subject. Putting a top using namespace is fine for me.

prince-chrismc commented 7 months ago

Thanks a ton for this suggestion, since we seem to be agreed this is not a "functional" improvement and we have split or indifferent opinions... I am going to side of the side of caution and mark this as closed.

I really appreciate you brining in new ideas, please keep them coming! 🚀