Skip to content

Commit

Permalink
Updated wsjcpp-core
Browse files Browse the repository at this point in the history
  • Loading branch information
sea-kg committed Oct 11, 2020
1 parent fa6038a commit e9d164f
Show file tree
Hide file tree
Showing 19 changed files with 766 additions and 445 deletions.
11 changes: 3 additions & 8 deletions src.wsjcpp/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Automaticly generated by wsjcpp@v0.1.5
# Automaticly generated by wsjcpp@v0.2.0
cmake_minimum_required(VERSION 3.0)

add_definitions(-DWSJCPP_APP_VERSION="v0.0.1")
add_definitions(-DWSJCPP_APP_VERSION="v0.0.2")
add_definitions(-DWSJCPP_APP_NAME="wsjcpp-async-jobs-pool")

if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
Expand All @@ -17,14 +17,9 @@ set (WSJCPP_SOURCES "")
find_package(Threads REQUIRED)
list (APPEND WSJCPP_LIBRARIES ${CMAKE_THREAD_LIBS_INIT})

# wsjcpp-core:v0.1.7
# wsjcpp-core:v0.2.1
list (APPEND WSJCPP_INCLUDE_DIRS "./src.wsjcpp/wsjcpp_core/")
list (APPEND WSJCPP_SOURCES "./src.wsjcpp/wsjcpp_core/wsjcpp_core.cpp")
list (APPEND WSJCPP_SOURCES "./src.wsjcpp/wsjcpp_core/wsjcpp_core.h")
list (APPEND WSJCPP_SOURCES "./src.wsjcpp/wsjcpp_core/wsjcpp_resources_manager.h")
list (APPEND WSJCPP_SOURCES "./src.wsjcpp/wsjcpp_core/wsjcpp_resources_manager.cpp")

# required-libraries
list (APPEND WSJCPP_LIBRARIES "-lpthread")


File renamed without changes.
70 changes: 70 additions & 0 deletions src.wsjcpp/wsjcpp_core/generate.WsjcppUnitTest.wsjcpp-script
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
#!/usr/bin/wsjcpp-safe-scripting

# log_info rootdir
# log_info script_filename

make_dir "./unit-tests.wsjcpp"
make_dir "./unit-tests.wsjcpp/src"

var class_name
set_value class_name arg1
normalize_class_name class_name

var filename_cpp
set_value filename_cpp arg2

var content_source
concat content_source "
#include <wsjcpp_core.h>
#include <wsjcpp_unit_tests.h>

// ---------------------------------------------------------------------
// " class_name "

class " class_name " : public WsjcppUnitTestBase {
public:
" class_name "();
virtual bool doBeforeTest() override;
virtual void executeTest() override;
virtual bool doAfterTest() override;
};

REGISTRY_WSJCPP_UNIT_TEST(" class_name ")

" class_name "::" class_name "()
: WsjcppUnitTestBase(\"" class_name "\") {
}

// ---------------------------------------------------------------------

bool " class_name "::doBeforeTest() {
// do something before test
return true;
}

// ---------------------------------------------------------------------

void " class_name "::executeTest() {
compare(\"Not implemented\", true, false);
// TODO unit test source code here
}

// ---------------------------------------------------------------------

bool " class_name "::doAfterTest() {
// do somethig after test
return true;
}

"

write_file filename_cpp content_source

log_info "
======
Generated class:
- " class_name "
Generated files:
- " filename_cpp "
======
"
29 changes: 19 additions & 10 deletions src.wsjcpp/wsjcpp_core/wsjcpp.hold.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ cmake_cxx_standard: 11
cmake_minimum_required: 3.0

name: wsjcpp-core
version: v0.1.7
version: v0.2.1
description: Basic Utils for wsjcpp
issues: https://github.com/wsjcpp/wsjcpp-core/issues
repositories:
Expand All @@ -16,33 +16,36 @@ keywords:
authors:
- name: Evgenii Sopov
email: mrseakg@gmail.com

distribution:
- source-file: src/wsjcpp_core.cpp
target-file: wsjcpp_core.cpp
type: "source-code"
sha1: "09ef821bbc090fc1cd8a15bc4a57a9a2ce8ae00d"
- source-file: src/wsjcpp_core.h
target-file: wsjcpp_core.h
type: "source-code" # todo must be header-file
sha1: "e6e4ab2067d3c942db08e3b79862486eaf851e4b"
- source-file: "src/wsjcpp_unit_tests.cpp"
target-file: "wsjcpp_unit_tests.cpp"
type: "unit-tests"
sha1: "fd5989d1a83c8b90bdc4d5e9bc9c3051eaa1e6d2"
- source-file: "src/wsjcpp_unit_tests.h"
target-file: "wsjcpp_unit_tests.h"
type: "unit-tests"
sha1: "83d4b6e046b6b58c42882ccae4be413e03c401c1"
- source-file: "src/wsjcpp_unit_tests_main.cpp"
target-file: "wsjcpp_unit_tests_main.cpp"
type: "unit-tests"
- source-file: "scripts.wsjcpp/generate.Class"
target-file: "generate.Class"
sha1: "388ae269b325c5e161f6c3a5c598575714a4bffc"
- source-file: "scripts.wsjcpp/generate.WsjcppUnitTest.wsjcpp-script"
target-file: "generate.WsjcppUnitTest.wsjcpp-script"
type: "safe-scripting-generate"
sha1: "a7c9c2d19bf81c5b00e659384b0b92a99319a4c1"
- source-file: "scripts.wsjcpp/generate.Class.wsjcpp-script"
target-file: "generate.Class.wsjcpp-script"
type: "safe-scripting-generate"
- source-file: "src/wsjcpp_resources_manager.h"
target-file: "wsjcpp_resources_manager.h"
type: "source-code"
- source-file: "src/wsjcpp_resources_manager.cpp"
target-file: "wsjcpp_resources_manager.cpp"
type: "source-code"

sha1: "de1799907c685d606b93e08b821b540c2faa2db1"
unit-tests:
cases:
- name: CoreNormalizePath
Expand Down Expand Up @@ -79,3 +82,9 @@ unit-tests:
description: "Test basic resources"
- name: "ListOfDirs"
description: "Check list of directories"
- name: "FilePermissions"
description: ""
- name: "StringPadding"
description: ""
- name: "DateTimeFormat"
description: ""
Loading

0 comments on commit e9d164f

Please sign in to comment.