diff --git a/README.md b/README.md index 56467a4..e6ee89d 100644 --- a/README.md +++ b/README.md @@ -37,6 +37,11 @@ $ sudo make install ### Checking the library version +```c++ +std::printf("Dogma for C++ %d.%d.%d\n", + dogma::version::major, dogma::version::minor, dogma::version::patch); +``` + ### Miscellaneous examples ## Reference diff --git a/test.cpp b/test.cpp index d42b886..ec1a232 100644 --- a/test.cpp +++ b/test.cpp @@ -4,10 +4,16 @@ #include // for assert() #include // for errno, EDOM +#include // for std::printf() #include // for EXIT_SUCCESS using namespace dogma; +static void example_version(void) { + std::printf("Dogma for C++ %d.%d.%d\n", + dogma::version::major, dogma::version::minor, dogma::version::patch); +} + static void test_Angle_radians(void) { assert(Angle::from_radians(0).radians() == 0); assert(Angle::from_radians(0.5 * M_PI).radians() == 0.5 * M_PI); @@ -58,6 +64,8 @@ static void test_Longitude(void) { } int main(void) { + example_version(); + test_Angle(); test_Latitude(); test_Longitude();