Skip to content

Commit

Permalink
upgrade to variant 1.1.4
Browse files Browse the repository at this point in the history
  • Loading branch information
kkaefer committed Nov 25, 2016
1 parent a1d32e3 commit e3acceb
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .mason
Submodule .mason updated 512 files
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ matrix:
before_script:
- git submodule update --init
- .mason/mason install clang 3.8.0
- .mason/mason install variant 1.1.0
- .mason/mason install variant 1.1.4
- export PATH=`.mason/mason prefix clang 3.8.0`/bin:$PATH
- os: osx
osx_image: xcode7.3
Expand Down
10 changes: 6 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
CXXFLAGS += -I include --std=c++14 -Wall -Wextra -Werror
MASON ?= .mason/mason

VARIANT = 1.1.4

default: test

$(MASON):
git submodule update --init

mason_packages: $(MASON)
$(MASON) install variant 1.1.0
mason_packages/headers/variant/$(VARIANT):
$(MASON) install variant $(VARIANT)

test: tests/* include/mapbox/geometry/* mason_packages Makefile
$(CXX) tests/*.cpp $(CXXFLAGS) `$(MASON) cflags variant 1.1.0` -o test
test: tests/* include/mapbox/geometry/* mason_packages/headers/variant/$(VARIANT) Makefile
$(CXX) tests/*.cpp $(CXXFLAGS) `$(MASON) cflags variant $(VARIANT)` -o test
./test

clean:
Expand Down
7 changes: 3 additions & 4 deletions tests/test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -155,10 +155,9 @@ static void testFeature() {
assert(p["null"].is<null_value_t>());
assert(p["null"] == null_value);

p["null"] = nullptr;
p["null"] = null_value_t{};
assert(p["null"].is<null_value_t>());
assert(p["null"] == null_value);
assert(p["null"] == nullptr);

assert(p == p);
assert(!(p != p));
Expand All @@ -169,10 +168,10 @@ static void testFeature() {
assert(p.size() == 6);

feature<double> id1 { point<double>() };
id1.id = { 1 };
id1.id = { uint64_t(1) };

feature<double> id2 { point<double>() };
id1.id = { 2 };
id1.id = { uint64_t(2) };

assert(id1 == id1);
assert(id1 != id2);
Expand Down

0 comments on commit e3acceb

Please sign in to comment.