Skip to content

Commit 8d4f9ac

Browse files
committed
Updated wsjcpp-core, README.md and version to v0.1.1
1 parent 665fa49 commit 8d4f9ac

14 files changed

Lines changed: 859 additions & 170 deletions

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
tmp/*
33
.logs/*
44
wsjcpp-parse-conf
5+
.vscode/*
56

67
# Prerequisites
78
*.d

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# wsjcpp-parse-conf
22

33

4-
[![Build Status](https://api.travis-ci.org/wsjcpp/wsjcpp-parse-conf.svg?branch=master)](https://travis-ci.org/wsjcpp/wsjcpp-parse-conf) [![Github Stars](https://img.shields.io/github/stars/wsjcpp/wsjcpp-parse-conf.svg?label=github%20%E2%98%85)](https://github.com/wsjcpp/wsjcpp-parse-conf) [![Github Stars](https://img.shields.io/github/contributors/wsjcpp/wsjcpp-parse-conf.svg)](https://github.com/wsjcpp/wsjcpp-parse-conf) [![Github Forks](https://img.shields.io/github/forks/wsjcpp/wsjcpp-parse-conf.svg?label=github%20forks)](https://github.com/wsjcpp/wsjcpp-parse-conf/network/members)
4+
[![Build Status](https://api.travis-ci.org/wsjcpp/wsjcpp-parse-conf.svg?branch=master)](https://travis-ci.org/wsjcpp/wsjcpp-parse-conf) [![Github Stars](https://img.shields.io/github/stars/wsjcpp/wsjcpp-parse-conf.svg?label=github%20%E2%98%85)](https://github.com/wsjcpp/wsjcpp-parse-conf) [![Github Stars](https://img.shields.io/github/contributors/wsjcpp/wsjcpp-parse-conf.svg)](https://github.com/wsjcpp/wsjcpp-parse-conf) [![Github Forks](https://img.shields.io/github/forks/wsjcpp/wsjcpp-parse-conf.svg?label=github%20forks)](https://github.com/wsjcpp/wsjcpp-parse-conf/network/members) [![Total alerts](https://img.shields.io/lgtm/alerts/g/wsjcpp/wsjcpp-parse-conf.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/wsjcpp/wsjcpp-parse-conf/alerts/) [![Language grade: C/C++](https://img.shields.io/lgtm/grade/cpp/g/wsjcpp/wsjcpp-parse-conf.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/wsjcpp/wsjcpp-parse-conf/context:cpp)
55

66
Primitive parser for *.conf files
77

src.wsjcpp/CMakeLists.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
# Automaticly generated by wsjcpp@v0.1.4
1+
# Automaticly generated by wsjcpp@v0.1.6
22
cmake_minimum_required(VERSION 3.0)
33

4-
add_definitions(-DWSJCPP_VERSION="v0.1.0")
5-
add_definitions(-DWSJCPP_NAME="wsjcpp-parse-conf")
4+
add_definitions(-DWSJCPP_APP_VERSION="v0.1.1")
5+
add_definitions(-DWSJCPP_APP_NAME="wsjcpp-parse-conf")
66

77
if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
88
set(MACOSX TRUE)
@@ -17,7 +17,7 @@ set (WSJCPP_SOURCES "")
1717
find_package(Threads REQUIRED)
1818
list (APPEND WSJCPP_LIBRARIES ${CMAKE_THREAD_LIBS_INIT})
1919

20-
# wsjcpp-core:v0.1.5
20+
# wsjcpp-core:v0.2.0
2121
list (APPEND WSJCPP_INCLUDE_DIRS "./src.wsjcpp/wsjcpp_core/")
2222
list (APPEND WSJCPP_SOURCES "./src.wsjcpp/wsjcpp_core/wsjcpp_core.cpp")
2323
list (APPEND WSJCPP_SOURCES "./src.wsjcpp/wsjcpp_core/wsjcpp_core.h")
Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
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 user_class_name
10+
set_value user_class_name arg1
11+
normalize_class_name user_class_name
12+
var class_name
13+
set_value class_name "UnitTest"
14+
concat class_name user_class_name
15+
16+
var base_filename
17+
convert_CamelCase_to_snake_case class_name base_filename
18+
# log_info base_filename
19+
20+
var filename_cpp
21+
concat filename_cpp "./unit-tests.wsjcpp/src/" base_filename ".cpp"
22+
23+
var filename_h
24+
concat filename_h "./unit-tests.wsjcpp/src/" base_filename ".h"
25+
26+
var ifndef_header
27+
set_value ifndef_header base_filename
28+
concat ifndef_header "_H"
29+
30+
to_upper_case ifndef_header
31+
32+
var content_header
33+
concat content_header "#ifndef " ifndef_header "
34+
#define " ifndef_header "
35+
36+
#include <wsjcpp_unit_tests.h>
37+
38+
class " class_name " : public WsjcppUnitTestBase {
39+
public:
40+
" class_name "();
41+
virtual bool doBeforeTest() override;
42+
virtual void executeTest() override;
43+
virtual bool doAfterTest() override;
44+
};
45+
46+
#endif // " ifndef_header
47+
48+
49+
var content_source
50+
concat content_source "
51+
#include \"" base_filename ".h\"
52+
#include <wsjcpp_core.h>
53+
54+
// ---------------------------------------------------------------------
55+
// " class_name "
56+
57+
REGISTRY_WSJCPP_UNIT_TEST(" class_name ")
58+
59+
" class_name "::" class_name "()
60+
: WsjcppUnitTestBase(\"" class_name "\") {
61+
}
62+
63+
// ---------------------------------------------------------------------
64+
65+
bool " class_name "::doBeforeTest() {
66+
// nothing
67+
return true;
68+
}
69+
70+
// ---------------------------------------------------------------------
71+
72+
void " class_name "::executeTest() {
73+
compare(\"Not implemented\", true, false);
74+
// TODO unit test source code here
75+
}
76+
77+
// ---------------------------------------------------------------------
78+
79+
bool " class_name "::doAfterTest() {
80+
// nothing
81+
return true;
82+
}
83+
84+
"
85+
86+
var file_source
87+
concat file_source "src/" filename_cpp
88+
89+
write_file filename_h content_header
90+
write_file filename_cpp content_source
91+
92+
log_info "
93+
======
94+
Generated class:
95+
- " class_name "
96+
Generated files:
97+
- " filename_h "
98+
- " filename_cpp "
99+
======
100+
"
101+
102+
wsjcpp_yml_unit_test_add user_class_name filename_h
103+
wsjcpp_yml_unit_test_add user_class_name filename_cpp

src.wsjcpp/wsjcpp_core/wsjcpp.hold.yml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ cmake_cxx_standard: 11
33
cmake_minimum_required: 3.0
44

55
name: wsjcpp-core
6-
version: v0.1.5
6+
version: v0.2.0
77
description: Basic Utils for wsjcpp
88
issues: https://github.com/wsjcpp/wsjcpp-core/issues
99
repositories:
@@ -33,6 +33,9 @@ distribution:
3333
- source-file: "src/wsjcpp_unit_tests_main.cpp"
3434
target-file: "wsjcpp_unit_tests_main.cpp"
3535
type: "unit-tests"
36+
- source-file: "scripts.wsjcpp/generate.WsjcppUnitTest"
37+
target-file: "generate.WsjcppUnitTest"
38+
type: "safe-scripting-generate"
3639
- source-file: "scripts.wsjcpp/generate.Class"
3740
target-file: "generate.Class"
3841
type: "safe-scripting-generate"
@@ -47,8 +50,6 @@ unit-tests:
4750
cases:
4851
- name: CoreNormalizePath
4952
description: Check function normalizePath
50-
- name: CoreUuid
51-
description: Check test generate uuid function
5253
- name: CoreExtractFilename
5354
description: Check function extract filenane from path
5455
- name: "ToUpper"
@@ -79,3 +80,11 @@ unit-tests:
7980
description: "Test function get human size in bytes"
8081
- name: "TestResources"
8182
description: "Test basic resources"
83+
- name: "ListOfDirs"
84+
description: "Check list of directories"
85+
- name: "FilePermissions"
86+
description: ""
87+
- name: "StringPadding"
88+
description: ""
89+
- name: "DateTimeFormat"
90+
description: ""

0 commit comments

Comments
 (0)