Skip to content

Commit

Permalink
google test
Browse files Browse the repository at this point in the history
  • Loading branch information
pstorz committed Dec 20, 2017
1 parent 65ac634 commit 5715881
Show file tree
Hide file tree
Showing 11 changed files with 27 additions and 23 deletions.
2 changes: 1 addition & 1 deletion src/filed/accurate.h
Expand Up @@ -27,7 +27,7 @@
* Generic accurate payload is the same for any storage class.
*
* We store the lstat field as a character field as it makes storing of the
* data much more efficient then storing it in a normal stat structure.
* data much more efficient than storing it in a normal stat structure.
* Nowadays most of these structures are 64 bits and they will use 136
* bytes (32 bits) and 128 bytes (64 bits) on Solaris. The ASCII encoding
* of the lstat field most of the time is between 43 and 75 bytes with an
Expand Down
4 changes: 3 additions & 1 deletion src/findlib/CMakeLists.txt
Expand Up @@ -41,4 +41,6 @@ set_target_properties(bareosfind PROPERTIES VERSION "${VERSION}"
DEFINE_SYMBOL "BUILDING_DLL"
)

#add_subdirectory(unittests)
IF (NOT HAVE_WIN32)
# add_subdirectory(unittests)
ENDIF()
2 changes: 1 addition & 1 deletion src/findlib/unittests/CMakeLists.txt
Expand Up @@ -21,7 +21,7 @@ include_directories(.. ../.. ../../include/)

set (TEST_SRC
# drivetype_test.cc
fstype_test.cc
# fstype_test.cc
)

add_executable(test_findlib
Expand Down
2 changes: 1 addition & 1 deletion src/findlib/unittests/fstype_test.cc
Expand Up @@ -27,10 +27,10 @@
* Philipp Storz, November 2017
*/

#include <stdio.h>
#include "bareos.h"
#include "gtest/gtest.h"
#include "findlib/find.h"
#include <stdio.h>

TEST(FstypeTest, RootFs) {
char fs[1000];
Expand Down
4 changes: 3 additions & 1 deletion src/lib/CMakeLists.txt
Expand Up @@ -107,4 +107,6 @@ set_target_properties(bareos PROPERTIES VERSION "${VERSION}"
INSTALL(FILES ${INCLUDE_FILES} DESTINATION ${includedir})


#add_subdirectory(unittests)
IF(NOT HAVE_WIN32)
add_subdirectory(unittests)
ENDIF()
17 changes: 9 additions & 8 deletions src/lib/unittests/CMakeLists.txt
Expand Up @@ -18,20 +18,21 @@
# 02110-1301, USA.

include_directories(.. ../.. ../../include/)

link_libraries(kernel32 user32 gdi32 winspool shell32 ole32 oleaut32 uuid comdlg32 advapi32)

IF(HAVE_WIN32)
link_libraries(kernel32
user32 gdi32 winspool shell32 ole32 oleaut32 uuid comdlg32 advapi32)
ENDIF()
set (TEST_SRC
alist_test.cc
dlist_test.cc
base64_test.cc
bsnprintf_test.cc
# base64_test.cc
# bsnprintf_test.cc
# devlock_test.cc
edit_test.cc
# edit_test.cc
htable_test.cc
junction_test.cc
# junction_test.cc
# passphrase_test.cc
scan_test.cc
# scan_test.cc
# rwlock_test.cc
# sellist_test.cc
#tree_test.cc
Expand Down
4 changes: 2 additions & 2 deletions src/lib/unittests/alist_test.cc
Expand Up @@ -27,9 +27,9 @@
* Philipp Storz, November 2017
*/

//#include "bareos.h"
#include "windows.h"
#include "gtest/gtest.h"
#include "bareos.h"
//#include "windows.h"

struct FILESET {
alist mylist;
Expand Down
6 changes: 3 additions & 3 deletions src/lib/unittests/bsnprintf_test.cc
Expand Up @@ -26,10 +26,10 @@
*
* Philipp Storz, November 2017
*/
#include "bareos.h"
#include "gtest/gtest.h"
#include "../lib/protos.h"
#include "protos.h"
#include "bareos.h"
/* #include "../lib/protos.h" */
/* #include "protos.h" */


TEST(bsnprintf, bsnprintf) {
Expand Down
6 changes: 3 additions & 3 deletions src/lib/unittests/dlist_test.cc
Expand Up @@ -27,10 +27,10 @@
* Philipp Storz, November 2017
*/

#include "bareos.h"
#include "gtest/gtest.h"
#include "../lib/protos.h"
#include "protos.h"
#include "bareos.h"
//#include "../lib/protos.h"
//#include "protos.h"



Expand Down
1 change: 0 additions & 1 deletion src/lib/unittests/edit_test.cc
Expand Up @@ -33,7 +33,6 @@
#include "../lib/protos.h"
#include "protos.h"


void d_msg(const char*, int, int, const char*, ...) {}


Expand Down
2 changes: 1 addition & 1 deletion src/lib/unittests/htable_test.cc
Expand Up @@ -26,8 +26,8 @@
*
* Philipp Storz, November 2017
*/
#include "bareos.h"
#include "gtest/gtest.h"
#include "bareos.h"
#include "../lib/protos.h"
#include "protos.h"

Expand Down

0 comments on commit 5715881

Please sign in to comment.