[A] Add more test cases for windows and fix compilation.
This commit is contained in:
parent
0430da4163
commit
61ec03f828
119
appveyor.yml
119
appveyor.yml
@ -1,25 +1,122 @@
|
|||||||
version: '{build}'
|
version: '{build}'
|
||||||
|
|
||||||
image: Visual Studio 2017
|
environment:
|
||||||
|
matrix:
|
||||||
|
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
|
||||||
|
configuration: Debug
|
||||||
|
platform: x86
|
||||||
|
CXX_FLAGS: ""
|
||||||
|
LINKER_FLAGS: ""
|
||||||
|
GENERATOR: Visual Studio 14 2015
|
||||||
|
|
||||||
platform:
|
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
|
||||||
- x64
|
configuration: Debug
|
||||||
|
platform: x86
|
||||||
|
CXX_FLAGS: ""
|
||||||
|
LINKER_FLAGS: ""
|
||||||
|
GENERATOR: Visual Studio 15 2017
|
||||||
|
|
||||||
configuration:
|
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
|
||||||
- Debug
|
configuration: Debug
|
||||||
- Release
|
platform: x86
|
||||||
|
CXX_FLAGS: ""
|
||||||
|
LINKER_FLAGS: ""
|
||||||
|
GENERATOR: Visual Studio 16 2019
|
||||||
|
|
||||||
|
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
|
||||||
|
configuration: Debug
|
||||||
|
platform: x64
|
||||||
|
CXX_FLAGS: ""
|
||||||
|
LINKER_FLAGS: ""
|
||||||
|
GENERATOR: Visual Studio 16 2019
|
||||||
|
|
||||||
|
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
|
||||||
|
configuration: Debug
|
||||||
|
COMPILER: mingw
|
||||||
|
platform: x86
|
||||||
|
CXX_FLAGS: ""
|
||||||
|
LINKER_FLAGS: ""
|
||||||
|
GENERATOR: Ninja
|
||||||
|
|
||||||
|
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
|
||||||
|
configuration: Release
|
||||||
|
COMPILER: mingw
|
||||||
|
platform: x86
|
||||||
|
CXX_FLAGS: ""
|
||||||
|
LINKER_FLAGS: ""
|
||||||
|
GENERATOR: Ninja
|
||||||
|
|
||||||
|
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
|
||||||
|
configuration: Release
|
||||||
|
platform: x86
|
||||||
|
CXX_FLAGS: ""
|
||||||
|
LINKER_FLAGS: ""
|
||||||
|
GENERATOR: Visual Studio 14 2015
|
||||||
|
|
||||||
|
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
|
||||||
|
configuration: Release
|
||||||
|
platform: x86
|
||||||
|
name: with_win_header
|
||||||
|
CXX_FLAGS: ""
|
||||||
|
LINKER_FLAGS: ""
|
||||||
|
GENERATOR: Visual Studio 14 2015
|
||||||
|
|
||||||
|
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
|
||||||
|
configuration: Release
|
||||||
|
platform: x86
|
||||||
|
CXX_FLAGS: "/permissive- /std:c++latest /utf-8"
|
||||||
|
LINKER_FLAGS: ""
|
||||||
|
GENERATOR: Visual Studio 15 2017
|
||||||
|
|
||||||
|
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
|
||||||
|
configuration: Release
|
||||||
|
platform: x86
|
||||||
|
CXX_FLAGS: ""
|
||||||
|
LINKER_FLAGS: ""
|
||||||
|
GENERATOR: Visual Studio 16 2019
|
||||||
|
|
||||||
|
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
|
||||||
|
configuration: Release
|
||||||
|
platform: x64
|
||||||
|
CXX_FLAGS: ""
|
||||||
|
LINKER_FLAGS: ""
|
||||||
|
GENERATOR: Visual Studio 14 2015
|
||||||
|
|
||||||
|
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
|
||||||
|
configuration: Release
|
||||||
|
platform: x64
|
||||||
|
CXX_FLAGS: "/permissive- /std:c++latest /utf-8 /F4000000"
|
||||||
|
LINKER_FLAGS: "/STACK:4000000"
|
||||||
|
GENERATOR: Visual Studio 15 2017
|
||||||
|
|
||||||
|
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
|
||||||
|
configuration: Release
|
||||||
|
platform: x64
|
||||||
|
CXX_FLAGS: ""
|
||||||
|
LINKER_FLAGS: ""
|
||||||
|
GENERATOR: Visual Studio 16 2019
|
||||||
|
|
||||||
|
|
||||||
|
init:
|
||||||
|
- cmake --version
|
||||||
|
- msbuild /version
|
||||||
|
|
||||||
install:
|
install:
|
||||||
- git submodule update --init --recursive
|
- git submodule update --init --recursive
|
||||||
|
- if "%COMPILER%"=="mingw" appveyor DownloadFile https://github.com/ninja-build/ninja/releases/download/v1.6.0/ninja-win.zip -FileName ninja.zip
|
||||||
|
- if "%COMPILER%"=="mingw" 7z x ninja.zip -oC:\projects\deps\ninja > nul
|
||||||
|
- if "%COMPILER%"=="mingw" set PATH=C:\projects\deps\ninja;%PATH%
|
||||||
|
- if "%COMPILER%"=="mingw" set PATH=C:\mingw-w64\x86_64-7.3.0-posix-seh-rt_v5-rev0\mingw64\bin;%PATH%
|
||||||
|
- if "%COMPILER%"=="mingw" g++ --version
|
||||||
|
- if "%platform%"=="x86" set GENERATOR_PLATFORM=Win32
|
||||||
|
|
||||||
before_build:
|
before_build:
|
||||||
- mkdir build
|
- dir
|
||||||
- cd build
|
- if "%GENERATOR%"=="Ninja" (cmake . -G "%GENERATOR%" -DCMAKE_BUILD_TYPE="%configuration%" -DCMAKE_CXX_FLAGS="%CXX_FLAGS%" -DCMAKE_EXE_LINKER_FLAGS="%LINKER_FLAGS%" -DCMAKE_IGNORE_PATH="C:/Program Files/Git/usr/bin") else (cmake . -G "%GENERATOR%" -A "%GENERATOR_PLATFORM%" -DCMAKE_CXX_FLAGS="%CXX_FLAGS%" -DCMAKE_EXE_LINKER_FLAGS="%LINKER_FLAGS%" -DCMAKE_IGNORE_PATH="C:/Program Files/Git/usr/bin")
|
||||||
- cmake -G "Visual Studio 15 2017 Win64" ..
|
|
||||||
- dir
|
- dir
|
||||||
|
|
||||||
build:
|
build_script:
|
||||||
project: $(APPVEYOR_BUILD_FOLDER)\build\$(APPVEYOR_PROJECT_NAME).sln
|
- cmake --build . --config "%configuration%"
|
||||||
|
|
||||||
test_script:
|
test_script:
|
||||||
- dir
|
- dir
|
||||||
|
14
lib/fort.hpp
14
lib/fort.hpp
@ -188,7 +188,7 @@ public:
|
|||||||
* - true: Success; cell property was changed.
|
* - true: Success; cell property was changed.
|
||||||
* - false: In case of error
|
* - false: In case of error
|
||||||
*/
|
*/
|
||||||
bool set_cell_text_align(enum fort::text_align value)
|
bool set_cell_text_align(fort::text_align value)
|
||||||
{
|
{
|
||||||
return set_property(FT_CPROP_TEXT_ALIGN, static_cast<int>(value));
|
return set_property(FT_CPROP_TEXT_ALIGN, static_cast<int>(value));
|
||||||
}
|
}
|
||||||
@ -258,7 +258,7 @@ public:
|
|||||||
* - true: Success; cell property was changed.
|
* - true: Success; cell property was changed.
|
||||||
* - false: In case of error.
|
* - false: In case of error.
|
||||||
*/
|
*/
|
||||||
bool set_cell_row_type(enum fort::row_type value)
|
bool set_cell_row_type(fort::row_type value)
|
||||||
{
|
{
|
||||||
return set_property(FT_CPROP_ROW_TYPE, static_cast<int>(value));
|
return set_property(FT_CPROP_ROW_TYPE, static_cast<int>(value));
|
||||||
}
|
}
|
||||||
@ -286,7 +286,7 @@ public:
|
|||||||
* - true: Success; cell property was changed.
|
* - true: Success; cell property was changed.
|
||||||
* - false: In case of error.
|
* - false: In case of error.
|
||||||
*/
|
*/
|
||||||
bool set_cell_content_fg_color(enum fort::color value)
|
bool set_cell_content_fg_color(fort::color value)
|
||||||
{
|
{
|
||||||
return set_property(FT_CPROP_CONT_FG_COLOR, static_cast<int>(value));
|
return set_property(FT_CPROP_CONT_FG_COLOR, static_cast<int>(value));
|
||||||
}
|
}
|
||||||
@ -300,7 +300,7 @@ public:
|
|||||||
* - true: Success; cell property was changed.
|
* - true: Success; cell property was changed.
|
||||||
* - false: In case of error.
|
* - false: In case of error.
|
||||||
*/
|
*/
|
||||||
bool set_cell_bg_color(enum fort::color value)
|
bool set_cell_bg_color(fort::color value)
|
||||||
{
|
{
|
||||||
return set_property(FT_CPROP_CELL_BG_COLOR, static_cast<int>(value));
|
return set_property(FT_CPROP_CELL_BG_COLOR, static_cast<int>(value));
|
||||||
}
|
}
|
||||||
@ -314,7 +314,7 @@ public:
|
|||||||
* - true: Success; cell property was changed.
|
* - true: Success; cell property was changed.
|
||||||
* - false: In case of error.
|
* - false: In case of error.
|
||||||
*/
|
*/
|
||||||
bool set_cell_content_bg_color(enum fort::color value)
|
bool set_cell_content_bg_color(fort::color value)
|
||||||
{
|
{
|
||||||
return set_property(FT_CPROP_CONT_BG_COLOR, static_cast<int>(value));
|
return set_property(FT_CPROP_CONT_BG_COLOR, static_cast<int>(value));
|
||||||
}
|
}
|
||||||
@ -328,7 +328,7 @@ public:
|
|||||||
* - true: Success; cell property was changed.
|
* - true: Success; cell property was changed.
|
||||||
* - false: In case of error.
|
* - false: In case of error.
|
||||||
*/
|
*/
|
||||||
bool set_cell_text_style(enum fort::text_style value)
|
bool set_cell_text_style(fort::text_style value)
|
||||||
{
|
{
|
||||||
return set_property(FT_CPROP_CELL_TEXT_STYLE, static_cast<int>(value));
|
return set_property(FT_CPROP_CELL_TEXT_STYLE, static_cast<int>(value));
|
||||||
}
|
}
|
||||||
@ -342,7 +342,7 @@ public:
|
|||||||
* - true: Success; cell property was changed.
|
* - true: Success; cell property was changed.
|
||||||
* - false: In case of error.
|
* - false: In case of error.
|
||||||
*/
|
*/
|
||||||
bool set_cell_content_text_style(enum fort::text_style value)
|
bool set_cell_content_text_style(fort::text_style value)
|
||||||
{
|
{
|
||||||
return set_property(FT_CPROP_CONT_TEXT_STYLE, static_cast<int>(value));
|
return set_property(FT_CPROP_CONT_TEXT_STYLE, static_cast<int>(value));
|
||||||
}
|
}
|
||||||
|
14
src/fort.hpp
14
src/fort.hpp
@ -188,7 +188,7 @@ public:
|
|||||||
* - true: Success; cell property was changed.
|
* - true: Success; cell property was changed.
|
||||||
* - false: In case of error
|
* - false: In case of error
|
||||||
*/
|
*/
|
||||||
bool set_cell_text_align(enum fort::text_align value)
|
bool set_cell_text_align(fort::text_align value)
|
||||||
{
|
{
|
||||||
return set_property(FT_CPROP_TEXT_ALIGN, static_cast<int>(value));
|
return set_property(FT_CPROP_TEXT_ALIGN, static_cast<int>(value));
|
||||||
}
|
}
|
||||||
@ -258,7 +258,7 @@ public:
|
|||||||
* - true: Success; cell property was changed.
|
* - true: Success; cell property was changed.
|
||||||
* - false: In case of error.
|
* - false: In case of error.
|
||||||
*/
|
*/
|
||||||
bool set_cell_row_type(enum fort::row_type value)
|
bool set_cell_row_type(fort::row_type value)
|
||||||
{
|
{
|
||||||
return set_property(FT_CPROP_ROW_TYPE, static_cast<int>(value));
|
return set_property(FT_CPROP_ROW_TYPE, static_cast<int>(value));
|
||||||
}
|
}
|
||||||
@ -286,7 +286,7 @@ public:
|
|||||||
* - true: Success; cell property was changed.
|
* - true: Success; cell property was changed.
|
||||||
* - false: In case of error.
|
* - false: In case of error.
|
||||||
*/
|
*/
|
||||||
bool set_cell_content_fg_color(enum fort::color value)
|
bool set_cell_content_fg_color(fort::color value)
|
||||||
{
|
{
|
||||||
return set_property(FT_CPROP_CONT_FG_COLOR, static_cast<int>(value));
|
return set_property(FT_CPROP_CONT_FG_COLOR, static_cast<int>(value));
|
||||||
}
|
}
|
||||||
@ -300,7 +300,7 @@ public:
|
|||||||
* - true: Success; cell property was changed.
|
* - true: Success; cell property was changed.
|
||||||
* - false: In case of error.
|
* - false: In case of error.
|
||||||
*/
|
*/
|
||||||
bool set_cell_bg_color(enum fort::color value)
|
bool set_cell_bg_color(fort::color value)
|
||||||
{
|
{
|
||||||
return set_property(FT_CPROP_CELL_BG_COLOR, static_cast<int>(value));
|
return set_property(FT_CPROP_CELL_BG_COLOR, static_cast<int>(value));
|
||||||
}
|
}
|
||||||
@ -314,7 +314,7 @@ public:
|
|||||||
* - true: Success; cell property was changed.
|
* - true: Success; cell property was changed.
|
||||||
* - false: In case of error.
|
* - false: In case of error.
|
||||||
*/
|
*/
|
||||||
bool set_cell_content_bg_color(enum fort::color value)
|
bool set_cell_content_bg_color(fort::color value)
|
||||||
{
|
{
|
||||||
return set_property(FT_CPROP_CONT_BG_COLOR, static_cast<int>(value));
|
return set_property(FT_CPROP_CONT_BG_COLOR, static_cast<int>(value));
|
||||||
}
|
}
|
||||||
@ -328,7 +328,7 @@ public:
|
|||||||
* - true: Success; cell property was changed.
|
* - true: Success; cell property was changed.
|
||||||
* - false: In case of error.
|
* - false: In case of error.
|
||||||
*/
|
*/
|
||||||
bool set_cell_text_style(enum fort::text_style value)
|
bool set_cell_text_style(fort::text_style value)
|
||||||
{
|
{
|
||||||
return set_property(FT_CPROP_CELL_TEXT_STYLE, static_cast<int>(value));
|
return set_property(FT_CPROP_CELL_TEXT_STYLE, static_cast<int>(value));
|
||||||
}
|
}
|
||||||
@ -342,7 +342,7 @@ public:
|
|||||||
* - true: Success; cell property was changed.
|
* - true: Success; cell property was changed.
|
||||||
* - false: In case of error.
|
* - false: In case of error.
|
||||||
*/
|
*/
|
||||||
bool set_cell_content_text_style(enum fort::text_style value)
|
bool set_cell_content_text_style(fort::text_style value)
|
||||||
{
|
{
|
||||||
return set_property(FT_CPROP_CONT_TEXT_STYLE, static_cast<int>(value));
|
return set_property(FT_CPROP_CONT_TEXT_STYLE, static_cast<int>(value));
|
||||||
}
|
}
|
||||||
|
@ -630,7 +630,7 @@ void test_table_builtin_border_styles(void)
|
|||||||
assert_str_equal(table_str, table_str_etalon);
|
assert_str_equal(table_str, table_str_etalon);
|
||||||
ft_destroy_table(table);
|
ft_destroy_table(table);
|
||||||
|
|
||||||
#if defined(FT_HAVE_WCHAR) && !defined(FT_MICROSOFT_COMPILER)
|
#if defined(FT_HAVE_WCHAR) && !defined(FT_MICROSOFT_COMPILER) && !defined(_WIN32)
|
||||||
ft_set_default_border_style(FT_DOUBLE2_STYLE);
|
ft_set_default_border_style(FT_DOUBLE2_STYLE);
|
||||||
table = create_basic_wtable();
|
table = create_basic_wtable();
|
||||||
table_wstr = ft_to_wstring(table);
|
table_wstr = ft_to_wstring(table);
|
||||||
|
Loading…
Reference in New Issue
Block a user