Merge pull request #1331 from xournalpp/update-azure

Separate pipelines and use Ninja for builds
presentation
Ulrich Huber 7 years ago committed by GitHub
commit f1f8685f3e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      PreLoad.cmake
  2. 141
      azure-pipelines/CI.yml
  3. 4
      azure-pipelines/clang-format-applied.yml
  4. 124
      azure-pipelines/release.yml
  5. 19
      azure-pipelines/steps/build_linux.yml
  6. 20
      azure-pipelines/steps/build_mac.yml
  7. 57
      azure-pipelines/steps/build_windows.yml
  8. 0
      azure-pipelines/util/format_diff_lines.pl
  9. 38
      test/control/LoadHandlerTest.cpp
  10. 2
      test/util/PathTest.cpp

@ -1,4 +1,4 @@
## Fix for windows
if (WIN32)
set (CMAKE_GENERATOR "MSYS Makefiles" CACHE INTERNAL "" FORCE)
set (CMAKE_GENERATOR "Ninja" CACHE INTERNAL "" FORCE)
endif ()

@ -1,96 +1,63 @@
trigger:
branches:
include:
- '*'
- '*'
exclude:
- stable
- l10n_master
- stable
- l10n_master
paths:
exclude:
- po/xournalpp.pot
- po/*.po
- po/xournalpp.pot
- po/*.po
stages:
- stage: 'Build_Test_Stage'
jobs:
- job: 'Linux'
pool:
vmImage: 'ubuntu-16.04'
displayName: 'Test Xournal++ on Linux'
steps:
- bash: |
sudo apt-get update
sudo apt-get install -y cmake libcppunit-dev libgtk-3-dev libpoppler-glib-dev portaudio19-dev libsndfile-dev liblua5.3-dev libzip-dev
displayName: 'Install dependencies'
- bash: |
mkdir build
displayName: 'Create build directory'
- bash: |
cmake .. -DCMAKE_DEBUG_INCLUDES_LDFLAGS=ON -DENABLE_CPPUNIT=ON -DDEBUG_COMPILE=ON
make -j `grep processor /proc/cpuinfo | tail -c 2`
workingDirectory: ./build
displayName: 'Build Xournal++'
- bash: |
ctest
workingDirectory: ./build
displayName: 'Run tests'
- stage: 'Build_Test_Stage'
jobs:
- job: 'Linux'
pool:
vmImage: 'ubuntu-16.04'
displayName: 'Test Xournal++ on Linux'
steps:
- template: steps/build_linux.yml
parameters:
build_type: 'Debug'
cmake_flags: '-DCMAKE_DEBUG_INCLUDES_LDFLAGS=ON -DENABLE_CPPUNIT=ON -DDEBUG_COMPILE=ON'
- bash: |
ctest --verbose
workingDirectory: ./build
displayName: 'Run tests'
- job: 'Windows'
pool:
vmImage: 'vs2017-win2016'
displayName: 'Test Xournal++ on Windows'
steps:
- template: steps/build_windows.yml
parameters:
build_type: 'Debug'
cmake_flags: '-DCMAKE_DEBUG_INCLUDES_LDFLAGS=ON -DENABLE_CPPUNIT=ON -DDEBUG_COMPILE=ON'
- script: |
set PATH=%PATH%;%CD:~0,2%\msys64\usr\bin;%CD:~0,2%\msys64\mingw64\bin"
%CD:~0,2%\msys64\usr\bin\bash -lc "ctest --verbose"
workingDirectory: ./build
env:
MSYS2_ARCH: x86_64
MSYSTEM: MINGW64
CHERE_INVOKING: yes
displayName: 'Run tests'
- job: Windows
pool:
vmImage: 'vs2017-win2016'
displayName: 'Build for Windows'
steps:
- script: |
git clone https://github.com/msys2/msys2-ci-base.git %CD:~0,2%\msys64
%CD:~0,2%\msys64\usr\bin\rm -rf %CD:~0,2%\msys64\.git
displayName: 'Install MSYS2'
- script: |
set PATH=%CD:~0,2%\msys64\usr\bin;%CD:~0,2%\msys64\mingw64\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem
%CD:~0,2%\msys64\usr\bin\pacman --noconfirm -Syuu
%CD:~0,2%\msys64\usr\bin\pacman --noconfirm -Syuu
%CD:~0,2%\msys64\usr\bin\pacman --noconfirm -S mingw-w64-x86_64-cmake make mingw-w64-x86_64-toolchain
%CD:~0,2%\msys64\usr\bin\pacman --noconfirm --needed -S base-devel mingw-w64-x86_64-toolchain mingw-w64-x86_64-cmake
%CD:~0,2%\msys64\usr\bin\pacman --noconfirm -S mingw-w64-x86_64-poppler mingw-w64-x86_64-gtk3 mingw-w64-x86_64-libsndfile mingw-w64-x86_64-libzip
%CD:~0,2%\msys64\usr\bin\pacman --noconfirm -Scc
env:
MSYS2_ARCH: x86_64
MSYSTEM: MINGW64
CHERE_INVOKING: yes
displayName: 'Install dependencies on Windows'
- script: |
set PATH=%PATH%;%CD:~0,2%\msys64\usr\bin;%CD:~0,2%\msys64\mingw64\bin"
%CD:~0,2%\msys64\usr\bin\bash -lc "./build-portaudio.sh"
workingDirectory: ./windows-setup
env:
MSYS2_ARCH: x86_64
MSYSTEM: MINGW64
CHERE_INVOKING: yes
displayName: 'Build Portaudio'
- script: |
set PATH=%PATH%;%CD:~0,2%\msys64\usr\bin;%CD:~0,2%\msys64\mingw64\bin"
%CD:~0,2%\msys64\usr\bin\bash -lc "./build-lua.sh"
workingDirectory: ./windows-setup
env:
MSYS2_ARCH: x86_64
MSYSTEM: MINGW64
CHERE_INVOKING: yes
displayName: 'Build Lua'
- script: |
set PATH=%PATH%;%CD:~0,2%\msys64\usr\bin;%CD:~0,2%\msys64\mingw64\bin"
%CD:~0,2%\msys64\usr\bin\bash -lc "mkdir build"
env:
MSYS2_ARCH: x86_64
MSYSTEM: MINGW64
CHERE_INVOKING: yes
displayName: 'Create build directory'
- script: |
set PATH=%PATH%;%CD:~0,2%\msys64\usr\bin;%CD:~0,2%\msys64\mingw64\bin"
%CD:~0,2%\msys64\usr\bin\bash -lc "cmake .."
%CD:~0,2%\msys64\usr\bin\bash -lc "make"
workingDirectory: ./build
env:
MSYS2_ARCH: x86_64
MSYSTEM: MINGW64
CHERE_INVOKING: yes
displayName: 'Build Xournal++'
# - job: macOS
# pool:
# vmImage: 'macOS-10.13'
# displayName: 'Test Xournal++ on MacOS'
# steps:
# - template: steps/build_mac.yml
# parameters:
# build_type: 'Debug'
# cmake_flags: '-DCMAKE_DEBUG_INCLUDES_LDFLAGS=ON -DENABLE_CPPUNIT=ON -DDEBUG_COMPILE=ON'
# - bash: |
# ctest --verbose
# workingDirectory: ./build
# displayName: 'Run tests'
#

@ -42,7 +42,7 @@ stages:
# Apply clang-format, modifying all badly formatted files
if [ ! -z "$FILES" ]; then
git --no-pager diff -U0 $BASE_COMMIT -- $FILES | perl azure-pipelines/format_diff_lines.pl
git --no-pager diff -U0 $BASE_COMMIT -- $FILES | perl azure-pipelines/util/format_diff_lines.pl
fi
displayName: 'Run clang-format on modified files'
@ -56,7 +56,7 @@ stages:
# Uncommitted changes
echo "The code was not formatted using clang-format before being submitted."
echo "To format the code, try running the following command from the root of the repository:"
echo " git --no-pager diff -U0 -- '*.cpp' '*.c' '*.h' '*.hpp' | perl azure-pipelines/format_diff_lines.pl"
echo " git --no-pager diff -U0 -- '*.cpp' '*.c' '*.h' '*.hpp' | perl azure-pipelines/util/format_diff_lines.pl"
echo
echo "The formatting changes required are shown below."
git --no-pager diff

@ -1,89 +1,45 @@
trigger:
- master
- master
pr: none
stages:
- stage: Release
jobs:
- job: Windows
pool:
vmImage: 'vs2017-win2016'
displayName: 'Build for Windows'
steps:
- script: |
git clone https://github.com/msys2/msys2-ci-base.git %CD:~0,2%\msys64
%CD:~0,2%\msys64\usr\bin\rm -rf %CD:~0,2%\msys64\.git
displayName: 'Install MSYS2'
- script: |
set PATH=%CD:~0,2%\msys64\usr\bin;%CD:~0,2%\msys64\mingw64\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem
%CD:~0,2%\msys64\usr\bin\pacman --noconfirm -Syuu
%CD:~0,2%\msys64\usr\bin\pacman --noconfirm -Syuu
%CD:~0,2%\msys64\usr\bin\pacman --noconfirm -S mingw-w64-x86_64-cmake make mingw-w64-x86_64-toolchain
%CD:~0,2%\msys64\usr\bin\pacman --noconfirm --needed -S base-devel mingw-w64-x86_64-toolchain mingw-w64-x86_64-cmake
%CD:~0,2%\msys64\usr\bin\pacman --noconfirm -S mingw-w64-x86_64-poppler mingw-w64-x86_64-gtk3 mingw-w64-x86_64-libsndfile mingw-w64-x86_64-libzip
%CD:~0,2%\msys64\usr\bin\pacman --noconfirm -Scc
env:
MSYS2_ARCH: x86_64
MSYSTEM: MINGW64
CHERE_INVOKING: yes
displayName: 'Install dependencies on Windows'
- script: |
set PATH=%PATH%;%CD:~0,2%\msys64\usr\bin;%CD:~0,2%\msys64\mingw64\bin"
%CD:~0,2%\msys64\usr\bin\bash -lc "./build-portaudio.sh"
workingDirectory: ./windows-setup
env:
MSYS2_ARCH: x86_64
MSYSTEM: MINGW64
CHERE_INVOKING: yes
displayName: 'Build Portaudio'
- script: |
set PATH=%PATH%;%CD:~0,2%\msys64\usr\bin;%CD:~0,2%\msys64\mingw64\bin"
%CD:~0,2%\msys64\usr\bin\bash -lc "./build-lua.sh"
workingDirectory: ./windows-setup
env:
MSYS2_ARCH: x86_64
MSYSTEM: MINGW64
CHERE_INVOKING: yes
displayName: 'Build Lua'
- script: |
set PATH=%PATH%;%CD:~0,2%\msys64\usr\bin;%CD:~0,2%\msys64\mingw64\bin"
%CD:~0,2%\msys64\usr\bin\bash -lc "mkdir build"
env:
MSYS2_ARCH: x86_64
MSYSTEM: MINGW64
CHERE_INVOKING: yes
displayName: 'Create build directory'
- script: |
set PATH=%PATH%;%CD:~0,2%\msys64\usr\bin;%CD:~0,2%\msys64\mingw64\bin"
%CD:~0,2%\msys64\usr\bin\bash -lc "cmake .."
%CD:~0,2%\msys64\usr\bin\bash -lc "make"
workingDirectory: ./build
env:
MSYS2_ARCH: x86_64
MSYSTEM: MINGW64
CHERE_INVOKING: yes
displayName: 'Build Xournal++'
- script: |
set PATH=%PATH%;%CD:~0,2%\msys64\usr\bin;%CD:~0,2%\msys64\mingw64\bin"
%CD:~0,2%\msys64\usr\bin\bash -lc "./build-setup.sh"
workingDirectory: ./windows-setup
env:
MSYS2_ARCH: x86_64
MSYSTEM: MINGW64
CHERE_INVOKING: yes
displayName: 'Create Setup'
- task: PublishPipelineArtifact@0
inputs:
artifactName: 'windows'
targetPath: './windows-setup/xournalpp-setup.exe'
displayName: 'Publish Windows Setup'
# - job: macOS
# pool:
# vmImage: 'macOS-10.13'
# displayName: 'Build for macOS'
# steps:
# - bash: |
# echo !!!TODO!!!
# displayName: 'Install dependencies on macOS'
- stage: Release
jobs:
- job: Windows
pool:
vmImage: 'vs2017-win2016'
displayName: 'Build Release for Windows'
steps:
- template: steps/build_windows.yml
parameters:
build_type: 'Release'
cmake_flags: ''
- script: |
set PATH=%PATH%;%CD:~0,2%\msys64\usr\bin;%CD:~0,2%\msys64\mingw64\bin"
%CD:~0,2%\msys64\usr\bin\bash -lc "./build-setup.sh"
workingDirectory: ./windows-setup
env:
MSYS2_ARCH: x86_64
MSYSTEM: MINGW64
CHERE_INVOKING: yes
displayName: 'Create Setup'
- task: PublishPipelineArtifact@0
inputs:
artifactName: 'windows'
targetPath: './windows-setup/xournalpp-setup.exe'
displayName: 'Publish Windows Setup'
# - job: macOS
# pool:
# vmImage: 'macOS-10.13'
# displayName: 'Build for macOS'
# steps:
# - template: steps/build_mac.yml
# parameters:
# build_type: 'Release'
# cmake_flags: ''
# - bash: |
# ctest
# workingDirectory: ./build
# displayName: 'Run tests'
#

@ -0,0 +1,19 @@
# Template for building Xournal++ on Linux
parameters:
build_type: 'Debug'
cmake_flags: ''
steps:
- bash: |
sudo apt-get update
sudo apt-get install -y cmake ninja-build libcppunit-dev libgtk-3-dev libpoppler-glib-dev portaudio19-dev libsndfile-dev liblua5.3-dev libzip-dev
displayName: 'Install dependencies'
- bash: |
mkdir build
displayName: 'Create build directory'
- bash: |
cmake -GNinja .. -DCMAKE_BUILD_TYPE=${{ parameters.build_type}} ${{ parameters.cmake_flags }}
cmake --build .
workingDirectory: ./build
displayName: 'Build Xournal++'

@ -0,0 +1,20 @@
parameters:
build_type: ''
cmake_flags: ''
steps:
- bash: |
brew update
brew upgrade
brew install cmake ninja pkg-config gtk+3 poppler librsvg adwaita-icon-theme portaudio libsndfile lua libzip cppunit gettext
displayName: 'Install dependencies'
- bash: |
mkdir build
displayName: 'Create build directory'
- bash: |
export PKG_CONFIG_PATH="/usr/local/opt/libffi/lib/pkgconfig:$PKG_CONFIG_PATH"
export LDFLAGS="-L/usr/local/opt/libffi/lib $LDFLAGS"
cmake -GNinja .. -DCMAKE_BUILD_TYPE=${{ parameters.build_type}} ${{ parameters.cmake_flags }}
cmake --build .
workingDirectory: ./build
displayName: 'Build Xournal++'

@ -0,0 +1,57 @@
parameters:
build_type: ''
cmake_flags: ''
steps:
- script: |
git clone https://github.com/msys2/msys2-ci-base.git %CD:~0,2%\msys64
%CD:~0,2%\msys64\usr\bin\rm -rf %CD:~0,2%\msys64\.git
displayName: 'Install MSYS2'
- script: |
set PATH=%CD:~0,2%\msys64\usr\bin;%CD:~0,2%\msys64\mingw64\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem
%CD:~0,2%\msys64\usr\bin\pacman --noconfirm -Syuu
%CD:~0,2%\msys64\usr\bin\pacman --noconfirm -Syuu
%CD:~0,2%\msys64\usr\bin\pacman --noconfirm -S mingw-w64-x86_64-toolchain mingw-w64-x86_64-cmake mingw-w64-x86_64-make mingw-w64-x86_64-ninja patch mingw-w64-x86_64-cppunit
%CD:~0,2%\msys64\usr\bin\pacman --noconfirm -S mingw-w64-x86_64-poppler mingw-w64-x86_64-gtk3 mingw-w64-x86_64-libsndfile mingw-w64-x86_64-libzip
%CD:~0,2%\msys64\usr\bin\pacman --noconfirm -Scc
env:
MSYS2_ARCH: x86_64
MSYSTEM: MINGW64
CHERE_INVOKING: yes
displayName: 'Install dependencies on Windows'
- script: |
set PATH=%PATH%;%CD:~0,2%\msys64\usr\bin;%CD:~0,2%\msys64\mingw64\bin"
%CD:~0,2%\msys64\usr\bin\bash -lc "./build-portaudio.sh"
workingDirectory: ./windows-setup
env:
MSYS2_ARCH: x86_64
MSYSTEM: MINGW64
CHERE_INVOKING: yes
displayName: 'Build Portaudio'
- script: |
set PATH=%PATH%;%CD:~0,2%\msys64\usr\bin;%CD:~0,2%\msys64\mingw64\bin"
%CD:~0,2%\msys64\usr\bin\bash -lc "./build-lua.sh"
workingDirectory: ./windows-setup
env:
MSYS2_ARCH: x86_64
MSYSTEM: MINGW64
CHERE_INVOKING: yes
displayName: 'Build Lua'
- script: |
set PATH=%PATH%;%CD:~0,2%\msys64\usr\bin;%CD:~0,2%\msys64\mingw64\bin"
%CD:~0,2%\msys64\usr\bin\bash -lc "mkdir build"
env:
MSYS2_ARCH: x86_64
MSYSTEM: MINGW64
CHERE_INVOKING: yes
displayName: 'Create build directory'
- script: |
set PATH=%PATH%;%CD:~0,2%\msys64\usr\bin;%CD:~0,2%\msys64\mingw64\bin"
%CD:~0,2%\msys64\usr\bin\bash -lc "cmake .. -DCMAKE_BUILD_TYPE=${{ parameters.build_type}} ${{ parameters.cmake_flags }}"
%CD:~0,2%\msys64\usr\bin\bash -lc "cmake --build ."
workingDirectory: ./build
env:
MSYS2_ARCH: x86_64
MSYSTEM: MINGW64
CHERE_INVOKING: yes
displayName: 'Build Xournal++'

@ -78,10 +78,10 @@ public:
LoadHandler handler;
Document* doc = handler.loadDocument(GET_TESTFILE("test1.xoj"));
CPPUNIT_ASSERT_EQUAL(1UL, doc->getPageCount());
CPPUNIT_ASSERT_EQUAL((size_t) 1, doc->getPageCount());
PageRef page = doc->getPage(0);
CPPUNIT_ASSERT_EQUAL(1UL, (*page).getLayerCount());
CPPUNIT_ASSERT_EQUAL((size_t) 1, (*page).getLayerCount());
Layer* layer = (*(*page).getLayers())[0];
Element* element = (*layer->getElements())[0];
@ -97,10 +97,10 @@ public:
LoadHandler handler;
Document* doc = handler.loadDocument(GET_TESTFILE("packaged_xopp/test.xopp"));
CPPUNIT_ASSERT_EQUAL(1UL, doc->getPageCount());
CPPUNIT_ASSERT_EQUAL((size_t) 1, doc->getPageCount());
PageRef page = doc->getPage(0);
CPPUNIT_ASSERT_EQUAL(1UL, (*page).getLayerCount());
CPPUNIT_ASSERT_EQUAL((size_t) 1, (*page).getLayerCount());
Layer* layer = (*(*page).getLayers())[0];
Element* element = (*layer->getElements())[0];
@ -116,10 +116,10 @@ public:
LoadHandler handler;
Document* doc = handler.loadDocument(GET_TESTFILE("test1.unzipped.xoj"));
CPPUNIT_ASSERT_EQUAL(1UL, doc->getPageCount());
CPPUNIT_ASSERT_EQUAL((size_t) 1, doc->getPageCount());
PageRef page = doc->getPage(0);
CPPUNIT_ASSERT_EQUAL(1UL, (*page).getLayerCount());
CPPUNIT_ASSERT_EQUAL((size_t) 1, (*page).getLayerCount());
Layer* layer = (*(*page).getLayers())[0];
Element* element = (*layer->getElements())[0];
@ -135,7 +135,7 @@ public:
LoadHandler handler;
Document* doc = handler.loadDocument(GET_TESTFILE("load/pages.xoj"));
CPPUNIT_ASSERT_EQUAL(5UL, doc->getPageCount());
CPPUNIT_ASSERT_EQUAL((size_t) 5, doc->getPageCount());
}
void testPagesZipped()
@ -143,7 +143,7 @@ public:
LoadHandler handler;
Document* doc = handler.loadDocument(GET_TESTFILE("packaged_xopp/pages.xopp"));
CPPUNIT_ASSERT_EQUAL(5UL, doc->getPageCount());
CPPUNIT_ASSERT_EQUAL((size_t) 5, doc->getPageCount());
}
void checkPageType(Document* doc, int pageIndex, string expectedText, PageType expectedBgType)
@ -153,7 +153,7 @@ public:
PageType bgType = page->getBackgroundType();
CPPUNIT_ASSERT(expectedBgType == bgType);
CPPUNIT_ASSERT_EQUAL(1UL, (*page).getLayerCount());
CPPUNIT_ASSERT_EQUAL((size_t) 1, (*page).getLayerCount());
Layer* layer = (*(*page).getLayers())[0];
Element* element = (*layer->getElements())[0];
@ -168,7 +168,7 @@ public:
LoadHandler handler;
Document* doc = handler.loadDocument(GET_TESTFILE("load/pages.xoj"));
CPPUNIT_ASSERT_EQUAL(5UL, doc->getPageCount());
CPPUNIT_ASSERT_EQUAL((size_t) 5, doc->getPageCount());
checkPageType(doc, 0, "p1", PageType("plain"));
checkPageType(doc, 1, "p2", PageType("lined"));
checkPageType(doc, 2, "p3", PageType("ruled"));
@ -181,7 +181,7 @@ public:
LoadHandler handler;
Document* doc = handler.loadDocument(GET_TESTFILE("packaged_xopp/pages.xopp"));
CPPUNIT_ASSERT_EQUAL(5UL, doc->getPageCount());
CPPUNIT_ASSERT_EQUAL((size_t) 5, doc->getPageCount());
checkPageType(doc, 0, "p1", PageType("plain"));
checkPageType(doc, 1, "p2", PageType("lined"));
checkPageType(doc, 2, "p3", PageType("ruled"));
@ -205,10 +205,10 @@ public:
LoadHandler handler;
Document* doc = handler.loadDocument(GET_TESTFILE("load/layer.xoj"));
CPPUNIT_ASSERT_EQUAL(1UL, doc->getPageCount());
CPPUNIT_ASSERT_EQUAL((size_t) 1, doc->getPageCount());
PageRef page = doc->getPage(0);
CPPUNIT_ASSERT_EQUAL(3UL, (*page).getLayerCount());
CPPUNIT_ASSERT_EQUAL((size_t) 3, (*page).getLayerCount());
checkLayer(page, 0, "l1");
checkLayer(page, 1, "l2");
checkLayer(page, 2, "l3");
@ -219,10 +219,10 @@ public:
LoadHandler handler;
Document* doc = handler.loadDocument(GET_TESTFILE("packaged_xopp/layer.xopp"));
CPPUNIT_ASSERT_EQUAL(1UL, doc->getPageCount());
CPPUNIT_ASSERT_EQUAL((size_t) 1, doc->getPageCount());
PageRef page = doc->getPage(0);
CPPUNIT_ASSERT_EQUAL(3UL, (*page).getLayerCount());
CPPUNIT_ASSERT_EQUAL((size_t) 3, (*page).getLayerCount());
checkLayer(page, 0, "l1");
checkLayer(page, 1, "l2");
checkLayer(page, 2, "l3");
@ -233,10 +233,10 @@ public:
LoadHandler handler;
Document* doc = handler.loadDocument(GET_TESTFILE("load/text.xml"));
CPPUNIT_ASSERT_EQUAL(1UL, doc->getPageCount());
CPPUNIT_ASSERT_EQUAL((size_t) 1, doc->getPageCount());
PageRef page = doc->getPage(0);
CPPUNIT_ASSERT_EQUAL(1UL, (*page).getLayerCount());
CPPUNIT_ASSERT_EQUAL((size_t) 1, (*page).getLayerCount());
Layer* layer = (*(*page).getLayers())[0];
Text* t1 = (Text*)(*layer->getElements())[0];
@ -262,10 +262,10 @@ public:
LoadHandler handler;
Document* doc = handler.loadDocument(GET_TESTFILE("packaged_xopp/text.xopp"));
CPPUNIT_ASSERT_EQUAL(1UL, doc->getPageCount());
CPPUNIT_ASSERT_EQUAL((size_t) 1, doc->getPageCount());
PageRef page = doc->getPage(0);
CPPUNIT_ASSERT_EQUAL(1UL, (*page).getLayerCount());
CPPUNIT_ASSERT_EQUAL((size_t) 1, (*page).getLayerCount());
Layer* layer = (*(*page).getLayers())[0];
Text* t1 = (Text*)(*layer->getElements())[0];

@ -50,7 +50,7 @@ public:
{
Path b = Path::fromUri("file:///tmp/test.txt");
CPPUNIT_ASSERT_EQUAL(false, b.isEmpty());
CPPUNIT_ASSERT_EQUAL(string("/tmp/test.txt"), b.str());
CPPUNIT_ASSERT_EQUAL(G_DIR_SEPARATOR_S + string("tmp") + G_DIR_SEPARATOR_S + string("test.txt"), b.str());
}
void testParentPath()

Loading…
Cancel
Save