Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
djinni
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
cpp-libs
djinni
Commits
15002676
Commit
15002676
authored
Sep 16, 2014
by
Jacob Potter
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use std::experimental::optional in the test suite.
parent
da4ef208
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
10 additions
and
8 deletions
+10
-8
test-suite/generated-src/cpp/test_helpers.hpp
test-suite/generated-src/cpp/test_helpers.hpp
+2
-2
test-suite/generated-src/jni/NativeTestHelpers.cpp
test-suite/generated-src/jni/NativeTestHelpers.cpp
+2
-2
test-suite/generated-src/objc/DBTestHelpersCppProxy.mm
test-suite/generated-src/objc/DBTestHelpersCppProxy.mm
+1
-1
test-suite/handwritten-src/cpp/test_helpers.cpp
test-suite/handwritten-src/cpp/test_helpers.cpp
+1
-1
test-suite/objc/DjinniObjcTest.xcodeproj/project.pbxproj
test-suite/objc/DjinniObjcTest.xcodeproj/project.pbxproj
+2
-2
test-suite/run_djinni.sh
test-suite/run_djinni.sh
+2
-0
No files found.
test-suite/generated-src/cpp/test_helpers.hpp
View file @
15002676
...
...
@@ -8,8 +8,8 @@
#include "primitive_list.hpp"
#include "set_record.hpp"
#include <cstdint>
#include <experimental/optional>
#include <memory>
#include <optional>
#include <string>
#include <unordered_map>
...
...
@@ -47,5 +47,5 @@ public:
static
void
check_client_interface_nonascii
(
const
std
::
shared_ptr
<
ClientInterface
>
&
i
);
static
std
::
optional
<
int32_t
>
return_none
();
static
std
::
experimental
::
optional
<
int32_t
>
return_none
();
};
test-suite/generated-src/jni/NativeTestHelpers.cpp
View file @
15002676
...
...
@@ -199,9 +199,9 @@ CJNIEXPORT jobject JNICALL Java_com_dropbox_djinni_test_TestHelpers_returnNone(J
try
{
DJINNI_FUNCTION_PROLOGUE0
(
jniEnv
);
std
::
optional
<
int32_t
>
cr
=
TestHelpers
::
return_none
();
std
::
experimental
::
optional
<
int32_t
>
cr
=
TestHelpers
::
return_none
();
return
::
djinni
::
HOptional
<
std
::
optional
,
::
djinni
::
HI32
>::
toJava
(
jniEnv
,
cr
);
return
::
djinni
::
HOptional
<
std
::
experimental
::
optional
,
::
djinni
::
HI32
>::
toJava
(
jniEnv
,
cr
);
}
JNI_TRANSLATE_EXCEPTIONS_RETURN
(
jniEnv
,
0
/* value doesn't matter */
)
}
...
...
test-suite/generated-src/objc/DBTestHelpersCppProxy.mm
View file @
15002676
...
...
@@ -175,7 +175,7 @@
+
(
NSNumber
*
)
returnNone
{
try
{
std
::
optional
<
int32_t
>
cppRet
=
TestHelpers
::
return_none
();
std
::
experimental
::
optional
<
int32_t
>
cppRet
=
TestHelpers
::
return_none
();
NSNumber
*
objcRet
;
if
(
cppRet
)
{
objcRet
=
[
NSNumber
numberWithInt
:(
*
(
cppRet
))];
...
...
test-suite/handwritten-src/cpp/test_helpers.cpp
View file @
15002676
...
...
@@ -85,6 +85,6 @@ void TestHelpers::check_client_interface_nonascii(const std::shared_ptr<ClientIn
}
}
std
::
optional
<
int32_t
>
TestHelpers
::
return_none
()
{
std
::
experimental
::
optional
<
int32_t
>
TestHelpers
::
return_none
()
{
return
{};
}
test-suite/objc/DjinniObjcTest.xcodeproj/project.pbxproj
View file @
15002676
...
...
@@ -534,7 +534,7 @@
65868B6E1989FE4200D60EEE
/* Debug */
=
{
isa
=
XCBuildConfiguration
;
buildSettings
=
{
CLANG_CXX_LANGUAGE_STANDARD
=
"c
ompiler-default
"
;
CLANG_CXX_LANGUAGE_STANDARD
=
"c
++14
"
;
DSTROOT
=
/tmp/DjinniObjcTest.dst
;
GCC_PRECOMPILE_PREFIX_HEADER
=
NO
;
OTHER_CPLUSPLUSFLAGS
=
(
...
...
@@ -551,7 +551,7 @@
65868B6F1989FE4200D60EEE
/* Release */
=
{
isa
=
XCBuildConfiguration
;
buildSettings
=
{
CLANG_CXX_LANGUAGE_STANDARD
=
"c
ompiler-default
"
;
CLANG_CXX_LANGUAGE_STANDARD
=
"c
++14
"
;
DSTROOT
=
/tmp/DjinniObjcTest.dst
;
GCC_PRECOMPILE_PREFIX_HEADER
=
NO
;
OTHER_CPLUSPLUSFLAGS
=
(
...
...
test-suite/run_djinni.sh
View file @
15002676
...
...
@@ -57,6 +57,8 @@ $base_dir/../src/run-assume-built \
\
--cpp-out
"
$temp_out
/cpp"
\
--ident-cpp-enum-type
foo_bar
\
--cpp-optional-template
"std::experimental::optional"
\
--cpp-optional-header
"<experimental/optional>"
\
\
--jni-out
"
$temp_out
/jni"
\
--ident-jni-class
NativeFooBar
\
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment