mirror of
https://github.com/ivabus/pantry
synced 2024-11-10 02:25:18 +03:00
new file: projects/github.com/libkml/libkml/package.yml
new file: projects/github.com/libkml/libkml/test.cpp
This commit is contained in:
parent
e4e8c11757
commit
e96cd691d0
40
projects/github.com/libkml/libkml/package.yml
Normal file
40
projects/github.com/libkml/libkml/package.yml
Normal file
|
@ -0,0 +1,40 @@
|
|||
distributable:
|
||||
url: git+https://github.com/libkml/libkml.git
|
||||
ref: ${{version.tag}}
|
||||
|
||||
versions:
|
||||
github: libkml/libkml
|
||||
|
||||
dependencies:
|
||||
zlib.net/minizip: ^1.3
|
||||
uriparser.github.io: ^0.9
|
||||
curl.se: ^8
|
||||
libexpat.github.io: ^2.5
|
||||
boost.org: '>=1.81'
|
||||
|
||||
build:
|
||||
dependencies:
|
||||
cmake.org: '*'
|
||||
script:
|
||||
- cmake -S . -B build $ARGS
|
||||
- cmake --build build
|
||||
- cmake --install build
|
||||
env:
|
||||
ARGS:
|
||||
- -DCMAKE_INSTALL_PREFIX={{prefix}}
|
||||
- -DCMAKE_INSTALL_LIBDIR=lib
|
||||
- -DCMAKE_BUILD_TYPE=Release
|
||||
- -DCMAKE_FIND_FRAMEWORK=LAST
|
||||
- -DCMAKE_VERBOSE_MAKEFILE=ON
|
||||
- -Wno-dev
|
||||
- -DBUILD_TESTING=OFF
|
||||
|
||||
test:
|
||||
dependencies:
|
||||
google.com/googletest: '*'
|
||||
freedesktop.org/pkg-config: '*'
|
||||
script:
|
||||
- COMPILE_FLAGS=$(pkg-config --cflags --libs libkml gtest)
|
||||
- c++ test.cpp $COMPILE_FLAGS -std=c++14 -o test
|
||||
- ./test | grep 'PASSED'
|
||||
- pkg-config --modversion libkml | grep {{version}}
|
25
projects/github.com/libkml/libkml/test.cpp
Normal file
25
projects/github.com/libkml/libkml/test.cpp
Normal file
|
@ -0,0 +1,25 @@
|
|||
#include "kml/regionator/regionator_qid.h"
|
||||
#include "gtest/gtest.h"
|
||||
|
||||
namespace kmlregionator {
|
||||
// This class is the unit test fixture for the KmlHandler class.
|
||||
class RegionatorQidTest : public testing::Test {
|
||||
protected:
|
||||
virtual void SetUp() {
|
||||
root_ = Qid::CreateRoot();
|
||||
}
|
||||
|
||||
Qid root_;
|
||||
};
|
||||
|
||||
// This tests the CreateRoot(), depth(), and str() methods of class Qid.
|
||||
TEST_F(RegionatorQidTest, TestRoot) {
|
||||
ASSERT_EQ(static_cast<size_t>(1), root_.depth());
|
||||
ASSERT_EQ(string("q0"), root_.str());
|
||||
}
|
||||
}
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
testing::InitGoogleTest(&argc, argv);
|
||||
return RUN_ALL_TESTS();
|
||||
}
|
Loading…
Reference in a new issue