Cambridge SMT System
globalfunctions.gtest.cpp File Reference

Unit testing: General functions. More...

#include <googletesting.h>
#include "main.custom_assert.hpp"
#include "main.logger.hpp"
#include "params.hpp"
Include dependency graph for globalfunctions.gtest.cpp:

Go to the source code of this file.

Functions

 TEST (numberconversions, int2string)
 Test toString<unsigned> More...
 
 TEST (numberconversions, string2int)
 Test toNumber<unsigned> More...
 
 TEST (stringutil, countneedles)
 Test countneedles. More...
 
 TEST (stringutil, trim_spaces)
 Test trim_spaces. More...
 
 TEST (stringutil, validate_source_sentence)
 Test validate_source_sentence. More...
 
 TEST (dotproduct, basic_test)
 Dot product test. More...
 
 TEST (stringutil, parseparamstring)
 ParseParamString test. More...
 
 TEST (stringutil, trim_trailing_zeros)
 trim_trailing_zeros tests. Reduce string representation of a float value More...
 
 TEST (stringutil, ends_with)
 
int main (int argc, char **argv)
 main function. If compiled individualy, will kickoff any tests in this file. More...
 

Detailed Description

Unit testing: General functions.

Date
8-8-2012
Author
Gonzalo Iglesias

Definition in file globalfunctions.gtest.cpp.

Function Documentation

int main ( int  argc,
char **  argv 
)

main function. If compiled individualy, will kickoff any tests in this file.

Definition at line 161 of file globalfunctions.gtest.cpp.

TEST ( numberconversions  ,
int2string   
)

Test toString<unsigned>

Definition at line 32 of file globalfunctions.gtest.cpp.

TEST ( numberconversions  ,
string2int   
)

Test toNumber<unsigned>

Definition at line 38 of file globalfunctions.gtest.cpp.

Here is the call graph for this function:

TEST ( stringutil  ,
countneedles   
)

Test countneedles.

Definition at line 53 of file globalfunctions.gtest.cpp.

Here is the call graph for this function:

TEST ( stringutil  ,
trim_spaces   
)

Test trim_spaces.

Empty case

Definition at line 66 of file globalfunctions.gtest.cpp.

Here is the call graph for this function:

TEST ( stringutil  ,
validate_source_sentence   
)

Test validate_source_sentence.

Definition at line 81 of file globalfunctions.gtest.cpp.

Here is the call graph for this function:

TEST ( dotproduct  ,
basic_test   
)

Dot product test.

Definition at line 97 of file globalfunctions.gtest.cpp.

Here is the call graph for this function:

TEST ( stringutil  ,
parseparamstring   
)

ParseParamString test.

Definition at line 114 of file globalfunctions.gtest.cpp.

Here is the call graph for this function:

TEST ( stringutil  ,
trim_trailing_zeros   
)

trim_trailing_zeros tests. Reduce string representation of a float value

Definition at line 129 of file globalfunctions.gtest.cpp.

Here is the call graph for this function:

TEST ( stringutil  ,
ends_with   
)

Definition at line 142 of file globalfunctions.gtest.cpp.

Here is the call graph for this function: