Skip to content

Commit 5f83410

Browse files
committed
Updated wsjcpp-core to v0.2.3
1 parent ed8534f commit 5f83410

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+1069
-640
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@
77
- Added license comment to source files
88
- Apply clang format for source code
99
- Removed requitements nlohmann::json (Author of nlohmann::json deny support wsjcpp subsystems)
10+
- Updated wsjcpp-core to v0.2.3

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ find_package(Threads REQUIRED)
66

77
include(${CMAKE_CURRENT_SOURCE_DIR}/src.wsjcpp/CMakeLists.txt)
88

9-
set(CMAKE_CXX_STANDARD 11)
9+
set(CMAKE_CXX_STANDARD 17)
1010
set(EXECUTABLE_OUTPUT_PATH ${wsjcpp-validators_SOURCE_DIR})
1111

1212
# Sources

src.wsjcpp/.gitkeep

Lines changed: 0 additions & 1 deletion
This file was deleted.

src.wsjcpp/CMakeLists.txt

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
# Automaticly generated by wsjcpp@v0.1.5
1+
# Automaticly generated by wsjcpp@v0.2.5
22
cmake_minimum_required(VERSION 3.0)
33

4-
add_definitions(-DWSJCPP_APP_VERSION="v0.1.2")
4+
add_definitions(-DWSJCPP_APP_VERSION="v0.1.3")
55
add_definitions(-DWSJCPP_APP_NAME="wsjcpp-validators")
66

77
if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
88
set(MACOSX TRUE)
99
endif()
1010

11-
set(CMAKE_CXX_STANDARD 11)
11+
set(CMAKE_CXX_STANDARD 17)
1212

1313
set (WSJCPP_LIBRARIES "")
1414
set (WSJCPP_INCLUDE_DIRS "")
@@ -17,12 +17,10 @@ set (WSJCPP_SOURCES "")
1717
find_package(Threads REQUIRED)
1818
list (APPEND WSJCPP_LIBRARIES ${CMAKE_THREAD_LIBS_INIT})
1919

20-
# wsjcpp-core:v0.1.7
21-
list (APPEND WSJCPP_INCLUDE_DIRS "./src.wsjcpp/wsjcpp_core/")
22-
list (APPEND WSJCPP_SOURCES "./src.wsjcpp/wsjcpp_core/wsjcpp_core.cpp")
23-
list (APPEND WSJCPP_SOURCES "./src.wsjcpp/wsjcpp_core/wsjcpp_core.h")
24-
list (APPEND WSJCPP_SOURCES "./src.wsjcpp/wsjcpp_core/wsjcpp_resources_manager.h")
25-
list (APPEND WSJCPP_SOURCES "./src.wsjcpp/wsjcpp_core/wsjcpp_resources_manager.cpp")
20+
# wsjcpp-core:v0.2.3
21+
list (APPEND WSJCPP_INCLUDE_DIRS "${CMAKE_SOURCE_DIR}/./src.wsjcpp/wsjcpp_core/")
22+
list (APPEND WSJCPP_SOURCES "${CMAKE_SOURCE_DIR}/./src.wsjcpp/wsjcpp_core/wsjcpp_core.cpp")
23+
list (APPEND WSJCPP_SOURCES "${CMAKE_SOURCE_DIR}/./src.wsjcpp/wsjcpp_core/wsjcpp_core.h")
2624

2725
# required-libraries
2826
list (APPEND WSJCPP_LIBRARIES "-lpthread")
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
#!/usr/bin/wsjcpp-safe-scripting
2+
3+
# log_info rootdir
4+
# log_info script_filename
5+
6+
make_dir "./unit-tests.wsjcpp"
7+
make_dir "./unit-tests.wsjcpp/src"
8+
9+
var class_name
10+
set_value class_name arg1
11+
normalize_class_name class_name
12+
13+
var filename_cpp
14+
set_value filename_cpp arg2
15+
16+
var content_source
17+
concat content_source "
18+
#include <wsjcpp_core.h>
19+
#include <wsjcpp_unit_tests.h>
20+
21+
// ---------------------------------------------------------------------
22+
// " class_name "
23+
24+
class " class_name " : public WsjcppUnitTestBase {
25+
public:
26+
" class_name "();
27+
virtual bool doBeforeTest() override;
28+
virtual void executeTest() override;
29+
virtual bool doAfterTest() override;
30+
};
31+
32+
REGISTRY_WSJCPP_UNIT_TEST(" class_name ")
33+
34+
" class_name "::" class_name "()
35+
: WsjcppUnitTestBase(\"" class_name "\") {
36+
}
37+
38+
// ---------------------------------------------------------------------
39+
40+
bool " class_name "::doBeforeTest() {
41+
// do something before test
42+
return true;
43+
}
44+
45+
// ---------------------------------------------------------------------
46+
47+
void " class_name "::executeTest() {
48+
compare(\"Not implemented\", true, false);
49+
// TODO unit test source code here
50+
}
51+
52+
// ---------------------------------------------------------------------
53+
54+
bool " class_name "::doAfterTest() {
55+
// do somethig after test
56+
return true;
57+
}
58+
59+
"
60+
61+
write_file filename_cpp content_source
62+
63+
log_info "
64+
======
65+
Generated class:
66+
- " class_name "
67+
Generated files:
68+
- " filename_cpp "
69+
======
70+
"

src.wsjcpp/wsjcpp_core/wsjcpp.hold.yml

Lines changed: 32 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
wsjcpp_version: v0.0.1
2-
cmake_cxx_standard: 11
2+
cmake_cxx_standard: 17
33
cmake_minimum_required: 3.0
44

55
name: wsjcpp-core
6-
version: v0.1.7
6+
version: v0.2.3
77
description: Basic Utils for wsjcpp
88
issues: https://github.com/wsjcpp/wsjcpp-core/issues
99
repositories:
@@ -21,28 +21,32 @@ distribution:
2121
- source-file: src/wsjcpp_core.cpp
2222
target-file: wsjcpp_core.cpp
2323
type: "source-code"
24+
sha1: "9153a6eff17ea98ac510d96de7060dd25053bdb3"
2425
- source-file: src/wsjcpp_core.h
2526
target-file: wsjcpp_core.h
2627
type: "source-code" # todo must be header-file
28+
sha1: "c2056e306e9cda6b90b764e83709b3c4e0199b8d"
2729
- source-file: "src/wsjcpp_unit_tests.cpp"
2830
target-file: "wsjcpp_unit_tests.cpp"
2931
type: "unit-tests"
32+
sha1: "fd5989d1a83c8b90bdc4d5e9bc9c3051eaa1e6d2"
3033
- source-file: "src/wsjcpp_unit_tests.h"
3134
target-file: "wsjcpp_unit_tests.h"
3235
type: "unit-tests"
36+
sha1: "83d4b6e046b6b58c42882ccae4be413e03c401c1"
3337
- source-file: "src/wsjcpp_unit_tests_main.cpp"
3438
target-file: "wsjcpp_unit_tests_main.cpp"
3539
type: "unit-tests"
36-
- source-file: "scripts.wsjcpp/generate.Class"
37-
target-file: "generate.Class"
40+
sha1: "388ae269b325c5e161f6c3a5c598575714a4bffc"
41+
- source-file: "scripts.wsjcpp/generate.WsjcppUnitTest.wsjcpp-script"
42+
target-file: "generate.WsjcppUnitTest.wsjcpp-script"
43+
type: "safe-scripting-generate"
44+
sha1: "a7c9c2d19bf81c5b00e659384b0b92a99319a4c1"
45+
- source-file: "scripts.wsjcpp/generate.Class.wsjcpp-script"
46+
target-file: "generate.Class.wsjcpp-script"
3847
type: "safe-scripting-generate"
39-
- source-file: "src/wsjcpp_resources_manager.h"
40-
target-file: "wsjcpp_resources_manager.h"
41-
type: "source-code"
42-
- source-file: "src/wsjcpp_resources_manager.cpp"
43-
target-file: "wsjcpp_resources_manager.cpp"
44-
type: "source-code"
4548

49+
sha1: "de1799907c685d606b93e08b821b540c2faa2db1"
4650
unit-tests:
4751
cases:
4852
- name: CoreNormalizePath
@@ -79,3 +83,21 @@ unit-tests:
7983
description: "Test basic resources"
8084
- name: "ListOfDirs"
8185
description: "Check list of directories"
86+
- name: "FilePermissions"
87+
description: ""
88+
- name: "StringPadding"
89+
description: ""
90+
- name: "DateTimeFormat"
91+
description: ""
92+
- name: "MakeDirsPath"
93+
description: ""
94+
- name: "ExtractDirpath"
95+
description: ""
96+
- name: "ExtractFilepath"
97+
description: ""
98+
- name: "StartsWith"
99+
description: ""
100+
101+
- name: "EndsWith"
102+
description: ""
103+

0 commit comments

Comments
 (0)