diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 00000000..28e75cee --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,26 @@ +version: 2 + +jobs: + build: + docker: + - image: "debian:stretch" + steps: + - checkout + - run: + name: Installing SUDO + command: 'apt-get update && apt-get install -y sudo && rm -rf /var/lib/apt/lists/*' + - run: + name: Installing GCC + command: 'apt-get update && apt-get install -y gcc g++' + - run: + name: Install CMAKE + command: 'apt-get update && sudo apt-get install -y cmake' + - run: + name: Creating Build Files + command: 'cmake -H. -Bbuild' + - run: + name: Creating Binary Files + command: 'cmake --build build' + - run: + name: ETL Unit Testing + command: './bin/etl' \ No newline at end of file diff --git a/appveyor.yml b/appveyor.yml new file mode 100644 index 00000000..b4f4dc4c --- /dev/null +++ b/appveyor.yml @@ -0,0 +1,23 @@ +version: 1.0.{build} +branches: + only: + - master +image: Visual Studio 2017 +configuration: +- Debug +- DebugNoSTL +clone_folder: c:\projects\etl +install: +- cmd: git submodule update --init --recursive +before_build: +- cmd: git clone https://github.com/unittest-cpp/unittest-cpp.git c:\projects\unittest-cpp +build: + project: test/vs2017/etl.vcxproj + verbosity: minimal +notifications: +- provider: Webhook + url: https://hooks.slack.com/services/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 + method: POST + on_build_success: true + on_build_failure: true + on_build_status_changed: true \ No newline at end of file diff --git a/include/etl/cstring.h b/include/etl/cstring.h index 6812e2a8..122cdb3b 100644 --- a/include/etl/cstring.h +++ b/include/etl/cstring.h @@ -258,7 +258,7 @@ namespace etl template etl::string make_string(const char (&text) [MAX_SIZE]) { - return etl::string(text); + return etl::string(text, MAX_SIZE - 1); } } diff --git a/include/etl/u16string.h b/include/etl/u16string.h index f52417eb..3dd33aab 100644 --- a/include/etl/u16string.h +++ b/include/etl/u16string.h @@ -258,7 +258,7 @@ namespace etl template etl::u16string make_string(const char16_t (&text) [MAX_SIZE]) { - return etl::u16string(text); + return etl::u16string(text, MAX_SIZE - 1); } } diff --git a/include/etl/u32string.h b/include/etl/u32string.h index 3eec812e..7c01c7a7 100644 --- a/include/etl/u32string.h +++ b/include/etl/u32string.h @@ -258,7 +258,7 @@ namespace etl template etl::u32string make_string(const char32_t (&text) [MAX_SIZE]) { - return etl::u32string(text); + return etl::u32string(text, MAX_SIZE - 1); } } diff --git a/include/etl/wstring.h b/include/etl/wstring.h index 9b28eef2..c2533037 100644 --- a/include/etl/wstring.h +++ b/include/etl/wstring.h @@ -259,7 +259,7 @@ namespace etl template etl::wstring make_string(const wchar_t (&text) [MAX_SIZE]) { - return etl::wstring(text); + return etl::wstring(text, MAX_SIZE - 1); } }