Electroneum
vercmp.cpp File Reference
#include "gtest/gtest.h"
#include "common/util.h"
Include dependency graph for vercmp.cpp:

Go to the source code of this file.

Functions

 TEST (vercmp, empty)
 
 TEST (vercmp, empty0)
 
 TEST (vercmp, empty1)
 
 TEST (vercmp, zero_zero)
 
 TEST (vercmp, one_one)
 
 TEST (vercmp, one_two)
 
 TEST (vercmp, two_one)
 
 TEST (vercmp, ten_nine)
 
 TEST (vercmp, one_dot_ten_one_dot_nine)
 
 TEST (vercmp, one_one_dot_nine)
 
 TEST (vercmp, to_master)
 
 TEST (vercmp, from_master)
 

Function Documentation

◆ TEST() [1/12]

TEST ( vercmp  ,
empty   
)

Definition at line 34 of file vercmp.cpp.

34 { ASSERT_TRUE(tools::vercmp("", "") == 0); }
#define ASSERT_TRUE(condition)
Definition: gtest.h:1865
int vercmp(const char *v0, const char *v1)
Definition: util.cpp:915
Here is the call graph for this function:

◆ TEST() [2/12]

TEST ( vercmp  ,
empty0   
)

Definition at line 35 of file vercmp.cpp.

35 { ASSERT_TRUE(tools::vercmp("", "0") == 0); }
#define ASSERT_TRUE(condition)
Definition: gtest.h:1865
int vercmp(const char *v0, const char *v1)
Definition: util.cpp:915
Here is the call graph for this function:

◆ TEST() [3/12]

TEST ( vercmp  ,
empty1   
)

Definition at line 36 of file vercmp.cpp.

36 { ASSERT_TRUE(tools::vercmp("0", "") == 0); }
#define ASSERT_TRUE(condition)
Definition: gtest.h:1865
int vercmp(const char *v0, const char *v1)
Definition: util.cpp:915
Here is the call graph for this function:

◆ TEST() [4/12]

TEST ( vercmp  ,
zero_zero   
)

Definition at line 37 of file vercmp.cpp.

37 { ASSERT_TRUE(tools::vercmp("0", "0") == 0); }
#define ASSERT_TRUE(condition)
Definition: gtest.h:1865
int vercmp(const char *v0, const char *v1)
Definition: util.cpp:915
Here is the call graph for this function:

◆ TEST() [5/12]

TEST ( vercmp  ,
one_one   
)

Definition at line 38 of file vercmp.cpp.

38 { ASSERT_TRUE(tools::vercmp("1", "1") == 0); }
#define ASSERT_TRUE(condition)
Definition: gtest.h:1865
int vercmp(const char *v0, const char *v1)
Definition: util.cpp:915
Here is the call graph for this function:

◆ TEST() [6/12]

TEST ( vercmp  ,
one_two   
)

Definition at line 39 of file vercmp.cpp.

39 { ASSERT_TRUE(tools::vercmp("1", "2") < 0); }
#define ASSERT_TRUE(condition)
Definition: gtest.h:1865
int vercmp(const char *v0, const char *v1)
Definition: util.cpp:915
Here is the call graph for this function:

◆ TEST() [7/12]

TEST ( vercmp  ,
two_one   
)

Definition at line 40 of file vercmp.cpp.

40 { ASSERT_TRUE(tools::vercmp("2", "1") > 0); }
#define ASSERT_TRUE(condition)
Definition: gtest.h:1865
int vercmp(const char *v0, const char *v1)
Definition: util.cpp:915
Here is the call graph for this function:

◆ TEST() [8/12]

TEST ( vercmp  ,
ten_nine   
)

Definition at line 41 of file vercmp.cpp.

41 { ASSERT_TRUE(tools::vercmp("10", "9") > 0); }
#define ASSERT_TRUE(condition)
Definition: gtest.h:1865
int vercmp(const char *v0, const char *v1)
Definition: util.cpp:915
Here is the call graph for this function:

◆ TEST() [9/12]

TEST ( vercmp  ,
one_dot_ten_one_dot_nine   
)

Definition at line 42 of file vercmp.cpp.

42 { ASSERT_TRUE(tools::vercmp("1.10", "1.9") > 0); }
#define ASSERT_TRUE(condition)
Definition: gtest.h:1865
int vercmp(const char *v0, const char *v1)
Definition: util.cpp:915
Here is the call graph for this function:

◆ TEST() [10/12]

TEST ( vercmp  ,
one_one_dot_nine   
)

Definition at line 43 of file vercmp.cpp.

43 { ASSERT_TRUE(tools::vercmp("1", "1.9") < 0); }
#define ASSERT_TRUE(condition)
Definition: gtest.h:1865
int vercmp(const char *v0, const char *v1)
Definition: util.cpp:915
Here is the call graph for this function:

◆ TEST() [11/12]

TEST ( vercmp  ,
to_master   
)

Definition at line 44 of file vercmp.cpp.

44 { ASSERT_TRUE(tools::vercmp("1.0", "1.0-master") < 0); }
#define ASSERT_TRUE(condition)
Definition: gtest.h:1865
int vercmp(const char *v0, const char *v1)
Definition: util.cpp:915
Here is the call graph for this function:

◆ TEST() [12/12]

TEST ( vercmp  ,
from_master   
)

Definition at line 45 of file vercmp.cpp.

45 { ASSERT_TRUE(tools::vercmp("1.0-master", "1.1") < 0); }
#define ASSERT_TRUE(condition)
Definition: gtest.h:1865
int vercmp(const char *v0, const char *v1)
Definition: util.cpp:915
Here is the call graph for this function: