-
-
Save pwais/e5a1ee3050604dc3f480 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/test-suite/generated-src/cpp/assorted_primitives.hpp b/test-suite/generated-src/cpp/assorted_primitives.hpp | |
| index 893121a..7a63774 100644 | |
| --- a/test-suite/generated-src/cpp/assorted_primitives.hpp | |
| +++ b/test-suite/generated-src/cpp/assorted_primitives.hpp | |
| @@ -4,7 +4,7 @@ | |
| #pragma once | |
| #include <cstdint> | |
| -#include <experimental/optional> | |
| +#include <optional.hpp> | |
| #include <utility> | |
| struct AssortedPrimitives final { | |
| diff --git a/test-suite/generated-src/cpp/client_interface.hpp b/test-suite/generated-src/cpp/client_interface.hpp | |
| index 9567510..6a92c0e 100644 | |
| --- a/test-suite/generated-src/cpp/client_interface.hpp | |
| +++ b/test-suite/generated-src/cpp/client_interface.hpp | |
| @@ -5,7 +5,7 @@ | |
| #include "client_returned_record.hpp" | |
| #include <cstdint> | |
| -#include <experimental/optional> | |
| +#include <optional.hpp> | |
| #include <string> | |
| #include <vector> | |
| diff --git a/test-suite/generated-src/cpp/client_returned_record.hpp b/test-suite/generated-src/cpp/client_returned_record.hpp | |
| index cc978db..0d40428 100644 | |
| --- a/test-suite/generated-src/cpp/client_returned_record.hpp | |
| +++ b/test-suite/generated-src/cpp/client_returned_record.hpp | |
| @@ -4,7 +4,7 @@ | |
| #pragma once | |
| #include <cstdint> | |
| -#include <experimental/optional> | |
| +#include <optional.hpp> | |
| #include <string> | |
| #include <utility> | |
| diff --git a/test-suite/generated-src/cpp/constants.hpp b/test-suite/generated-src/cpp/constants.hpp | |
| index 2ef37e8..b371935 100644 | |
| --- a/test-suite/generated-src/cpp/constants.hpp | |
| +++ b/test-suite/generated-src/cpp/constants.hpp | |
| @@ -4,7 +4,7 @@ | |
| #pragma once | |
| #include <cstdint> | |
| -#include <experimental/optional> | |
| +#include <optional.hpp> | |
| #include <string> | |
| #include <utility> | |
| diff --git a/test-suite/generated-src/cpp/test_duration.hpp b/test-suite/generated-src/cpp/test_duration.hpp | |
| index 4ea5bcc..e3adc20 100644 | |
| --- a/test-suite/generated-src/cpp/test_duration.hpp | |
| +++ b/test-suite/generated-src/cpp/test_duration.hpp | |
| @@ -5,7 +5,7 @@ | |
| #include <chrono> | |
| #include <cstdint> | |
| -#include <experimental/optional> | |
| +#include <optional.hpp> | |
| #include <string> | |
| class TestDuration { | |
| diff --git a/test-suite/generated-src/cpp/test_helpers.hpp b/test-suite/generated-src/cpp/test_helpers.hpp | |
| index d50a1d6..cce5a8a 100644 | |
| --- a/test-suite/generated-src/cpp/test_helpers.hpp | |
| +++ b/test-suite/generated-src/cpp/test_helpers.hpp | |
| @@ -10,8 +10,8 @@ | |
| #include "primitive_list.hpp" | |
| #include "set_record.hpp" | |
| #include <cstdint> | |
| -#include <experimental/optional> | |
| #include <memory> | |
| +#include <optional.hpp> | |
| #include <string> | |
| #include <unordered_map> | |
| #include <vector> | |
| diff --git a/test-suite/handwritten-src/cpp/test_helpers.cpp b/test-suite/handwritten-src/cpp/test_helpers.cpp | |
| index 28c32ed..b23ad91 100644 | |
| --- a/test-suite/handwritten-src/cpp/test_helpers.cpp | |
| +++ b/test-suite/handwritten-src/cpp/test_helpers.cpp | |
| @@ -9,7 +9,7 @@ SetRecord TestHelpers::get_set_record() { | |
| "StringA", | |
| "StringB", | |
| "StringC" | |
| - }, {} }; | |
| + }, std::unordered_set<int32_t>{} }; | |
| } | |
| bool TestHelpers::check_set_record(const SetRecord & rec) { | |
| diff --git a/test-suite/java/Makefile b/test-suite/java/Makefile | |
| index 16369c5..cb96d0a 100644 | |
| --- a/test-suite/java/Makefile | |
| +++ b/test-suite/java/Makefile | |
| @@ -1,6 +1,6 @@ | |
| SUPPORT_DIR := ../../support-lib/jni | |
| -DYLIB := libDjinniTestNative.dylib | |
| +DYLIB := libDjinniTestNative.so | |
| # Hacky - dummies cancel out .. to make sure objs are all under obj/ | |
| OBJ_DIR := obj/dummy/dummy | |
| @@ -13,11 +13,11 @@ CPP_SRCS := $(SUPPORT_DIR)/djinni_support.cpp \ | |
| CPP_OBJS := $(patsubst %,$(OBJ_DIR)/%,$(CPP_SRCS:.cpp=.o)) | |
| -CPPFLAGS := -std=c++1y -I../generated-src/{jni,cpp} -I$(SUPPORT_DIR) -I/System/Library/Frameworks/JavaVM.framework/Headers -I../handwritten-src/cpp -g -Wall -Werror | |
| +CPPFLAGS := -fPIC -std=c++1y -I/usr/lib/jvm/java-8-openjdk-amd64/include/ -I/usr/lib/jvm/java-8-openjdk-amd64/include/linux/ -I../generated-src/jni -I/opt/Optional -I../generated-src/cpp -I$(SUPPORT_DIR) -I/System/Library/Frameworks/JavaVM.framework/Headers -I../handwritten-src/cpp -g -Wall -Werror | |
| $(OBJ_DIR)/%.o: %.cpp | |
| @mkdir -p $(dir $@) | |
| - $(CXX) -MMD $(CPPFLAGS) -c $< -o $@ | |
| + clang++ -MMD $(CPPFLAGS) -c $< -o $@ | |
| @./fixdep.sh $(@:.o=.d) > $(@:.o=.P) | |
| default: | |
| @@ -25,7 +25,7 @@ default: | |
| @exit 1 | |
| $(DYLIB): $(CPP_OBJS) | |
| - clang++ $(CPPFLAGS) $(CPP_OBJS) -dynamiclib -o $@ | |
| + clang++ $(CPPFLAGS) $(CPP_OBJS) -shared -o $@ | |
| clean: | |
| rm -rf obj $(CPP_OBJS) $(CPP_OBJS:.o=.d) $(CPP_OBJS:.o=.P) $(DYLIB)* | |
| diff --git a/test-suite/java/build.xml b/test-suite/java/build.xml | |
| index 6e76e65..2fa643e 100644 | |
| --- a/test-suite/java/build.xml | |
| +++ b/test-suite/java/build.xml | |
| @@ -3,10 +3,10 @@ | |
| <target name="test" description="blah"> | |
| <exec executable="make" failonerror="true"> | |
| <arg value="-j12"/> | |
| - <arg value="libDjinniTestNative.dylib"/> | |
| + <arg value="libDjinniTestNative.so"/> | |
| </exec> | |
| <mkdir dir="classes"/> | |
| - <javac destdir="classes"> | |
| + <javac includeantruntime="false" encoding="UTF-8" destdir="classes"> | |
| <classpath path="hamcrest-core-1.3.jar:junit-4.11.jar:jsr305-3.0.0.jar"/> | |
| <src path="../generated-src"/> | |
| <src path="../handwritten-src"/> | |
| @@ -14,6 +14,8 @@ | |
| <java classname="org.junit.runner.JUnitCore" fork="true" failonerror="true"> | |
| <classpath path="hamcrest-core-1.3.jar:junit-4.11.jar:classes"/> | |
| <jvmarg value="-Xcheck:jni"/> | |
| + <env key="LD_LIBRARY_PATH" value="${basedir}:${env.LD_LIBRARY_PATH}"/> | |
| + <!-- <sysproperty key="java.library.path" value="${java.library.path};${basedir};/opt/oarphkit/deps/djinni/test-suite/java"/> --> | |
| <arg value="com.dropbox.djinni.test.AllTests"/> | |
| </java> | |
| </target> | |
| diff --git a/test-suite/run_djinni.sh b/test-suite/run_djinni.sh | |
| index 70bbe4b..a7102ae 100755 | |
| --- a/test-suite/run_djinni.sh | |
| +++ b/test-suite/run_djinni.sh | |
| @@ -69,7 +69,7 @@ fi | |
| --cpp-out "$temp_out_relative/cpp" \ | |
| --ident-cpp-enum-type foo_bar \ | |
| --cpp-optional-template "std::experimental::optional" \ | |
| - --cpp-optional-header "<experimental/optional>" \ | |
| + --cpp-optional-header "<optional.hpp>" \ | |
| \ | |
| --jni-out "$temp_out_relative/jni" \ | |
| --ident-jni-class NativeFooBar \ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment