File: test_version.cpp

package info (click to toggle)
spglib 2.7.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 14,180 kB
  • sloc: ansic: 125,066; python: 7,717; cpp: 2,197; f90: 2,143; ruby: 792; makefile: 22; sh: 18
file content (21 lines) | stat: -rw-r--r-- 489 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#include <gtest/gtest.h>

#include <string>

extern "C" {
#include "spglib.h"
}

// Stringerize compiler definitions
#define STR(x) #x
#define STRING(x) STR(x)

TEST(Version, version_strings) {
    std::string version(spg_get_version());
    std::string version_full(spg_get_version_full());
    std::string commit(spg_get_commit());

    EXPECT_EQ(version, STRING(Spglib_VERSION));
    EXPECT_EQ(version_full, STRING(Spglib_VERSION_FULL));
    EXPECT_EQ(commit, STRING(Spglib_COMMIT));
}