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
805c1eda
Commit
805c1eda
authored
Sep 15, 2015
by
Jacob Potter
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add some test comments to the test suite's Djinni files
parent
c871d91e
Changes
22
Hide whitespace changes
Inline
Side-by-side
Showing
22 changed files
with
115 additions
and
1 deletion
+115
-1
src/source/ObjcGenerator.scala
src/source/ObjcGenerator.scala
+1
-1
test-suite/djinni/client_interface.djinni
test-suite/djinni/client_interface.djinni
+2
-0
test-suite/djinni/constants.djinni
test-suite/djinni/constants.djinni
+9
-0
test-suite/djinni/test.djinni
test-suite/djinni/test.djinni
+10
-0
test-suite/generated-src/cpp/client_interface.hpp
test-suite/generated-src/cpp/client_interface.hpp
+1
-0
test-suite/generated-src/cpp/client_returned_record.hpp
test-suite/generated-src/cpp/client_returned_record.hpp
+1
-0
test-suite/generated-src/cpp/constants.hpp
test-suite/generated-src/cpp/constants.hpp
+6
-0
test-suite/generated-src/cpp/constants_interface.hpp
test-suite/generated-src/cpp/constants_interface.hpp
+7
-0
test-suite/generated-src/cpp/empty_record.hpp
test-suite/generated-src/cpp/empty_record.hpp
+5
-0
test-suite/generated-src/cpp/test_helpers.hpp
test-suite/generated-src/cpp/test_helpers.hpp
+11
-0
test-suite/generated-src/java/com/dropbox/djinni/test/ClientInterface.java
...ted-src/java/com/dropbox/djinni/test/ClientInterface.java
+1
-0
test-suite/generated-src/java/com/dropbox/djinni/test/ClientReturnedRecord.java
...rc/java/com/dropbox/djinni/test/ClientReturnedRecord.java
+1
-0
test-suite/generated-src/java/com/dropbox/djinni/test/Constants.java
...generated-src/java/com/dropbox/djinni/test/Constants.java
+6
-0
test-suite/generated-src/java/com/dropbox/djinni/test/ConstantsInterface.java
...-src/java/com/dropbox/djinni/test/ConstantsInterface.java
+7
-0
test-suite/generated-src/java/com/dropbox/djinni/test/EmptyRecord.java
...nerated-src/java/com/dropbox/djinni/test/EmptyRecord.java
+5
-0
test-suite/generated-src/java/com/dropbox/djinni/test/TestHelpers.java
...nerated-src/java/com/dropbox/djinni/test/TestHelpers.java
+11
-0
test-suite/generated-src/objc/DBClientInterface.h
test-suite/generated-src/objc/DBClientInterface.h
+1
-0
test-suite/generated-src/objc/DBClientReturnedRecord.h
test-suite/generated-src/objc/DBClientReturnedRecord.h
+1
-0
test-suite/generated-src/objc/DBConstants.h
test-suite/generated-src/objc/DBConstants.h
+6
-0
test-suite/generated-src/objc/DBConstantsInterface.h
test-suite/generated-src/objc/DBConstantsInterface.h
+7
-0
test-suite/generated-src/objc/DBEmptyRecord.h
test-suite/generated-src/objc/DBEmptyRecord.h
+5
-0
test-suite/generated-src/objc/DBTestHelpers.h
test-suite/generated-src/objc/DBTestHelpers.h
+11
-0
No files found.
src/source/ObjcGenerator.scala
View file @
805c1eda
...
...
@@ -139,7 +139,6 @@ class ObjcGenerator(spec: Spec) extends Generator(spec) {
}
writeObjcFile
(
marshal
.
headerName
(
ident
),
origin
,
refs
.
header
,
w
=>
{
writeDoc
(
w
,
doc
)
for
(
c
<-
i
.
consts
)
{
writeDoc
(
w
,
c
.
doc
)
w
.
w
(
s
"extern "
)
...
...
@@ -147,6 +146,7 @@ class ObjcGenerator(spec: Spec) extends Generator(spec) {
w
.
wl
(
s
";"
)
}
w
.
wl
writeDoc
(
w
,
doc
)
if
(
i
.
ext
.
objc
)
w
.
wl
(
s
"@protocol $self"
)
else
w
.
wl
(
s
"@interface $self : NSObject"
)
for
(
m
<-
i
.
methods
)
{
w
.
wl
...
...
test-suite/djinni/client_interface.djinni
View file @
805c1eda
# Record returned by a client
client_returned_record = record {
record_id: i64;
content: string;
misc: optional<string>;
}
# Client interface
client_interface = interface +j +o {
# Returns record of given string
get_record(record_id: i64, utf8string: string, misc: optional<string>): client_returned_record;
...
...
test-suite/djinni/constants.djinni
View file @
805c1eda
...
...
@@ -2,12 +2,16 @@ constants = record {
some_integer: i32;
some_string: string;
# bool_constant has documentation.
const bool_constant: bool = true;
const i8_constant: i8 = 1;
const i16_constant: i16 = 2;
const i32_constant: i32 = 3;
const i64_constant: i64 = 4;
const f32_constant: f32 = 5.0;
# f64_constant has long documentation.
# (Second line of multi-line documentation.
# Indented third line of multi-line documentation.)
const f64_constant: f64 = 5.0;
const string_constant: string = "string-constant";
const optional_integer_constant: optional<i32> = 1;
...
...
@@ -18,11 +22,16 @@ constants = record {
};
}
# Interface containing constants
constants_interface = interface +c {
const bool_constant: bool = true;
const i8_constant: i8 = 1;
const i16_constant: i16 = 2;
# i32_constant has documentation.
const i32_constant: i32 = 3;
# i64_constant has long documentation.
# (Second line of multi-line documentation.
# Indented third line of multi-line documentation.)
const i64_constant: i64 = 4;
const f32_constant: f32 = 5.0;
const f64_constant: f64 = 5.0;
...
...
test-suite/djinni/test.djinni
View file @
805c1eda
# Helper methods used by various different tests.
# (Second line of multi-line documentation.
# Indented third line of multi-line documentation.)
test_helpers = interface +c {
# Method with documentation
static get_set_record(): set_record;
# Method with long documentation
# (Second line of multi-line documentation.
# Indented third line of multi-line documentation.)
static check_set_record(rec: set_record): bool;
static get_primitive_list(): primitive_list;
...
...
@@ -35,6 +42,9 @@ test_helpers = interface +c {
static id_binary(b: binary): binary;
}
# Empty record
# (Second line of multi-line documentation.
# Indented third line of multi-line documentation.)
empty_record = record {
}
test-suite/generated-src/cpp/client_interface.hpp
View file @
805c1eda
...
...
@@ -9,6 +9,7 @@
#include <string>
#include <vector>
/** Client interface */
class
ClientInterface
{
public:
virtual
~
ClientInterface
()
{}
...
...
test-suite/generated-src/cpp/client_returned_record.hpp
View file @
805c1eda
...
...
@@ -8,6 +8,7 @@
#include <string>
#include <utility>
/** Record returned by a client */
struct
ClientReturnedRecord
final
{
int64_t
record_id
;
std
::
string
content
;
...
...
test-suite/generated-src/cpp/constants.hpp
View file @
805c1eda
...
...
@@ -10,6 +10,7 @@
struct
Constants
final
{
/** bool_constant has documentation. */
static
bool
const
BOOL_CONSTANT
;
static
int8_t
const
I8_CONSTANT
;
...
...
@@ -22,6 +23,11 @@ struct Constants final {
static
float
const
F32_CONSTANT
;
/**
* f64_constant has long documentation.
* (Second line of multi-line documentation.
* Indented third line of multi-line documentation.)
*/
static
double
const
F64_CONSTANT
;
static
std
::
string
const
STRING_CONSTANT
;
...
...
test-suite/generated-src/cpp/constants_interface.hpp
View file @
805c1eda
...
...
@@ -5,6 +5,7 @@
#include <cstdint>
/** Interface containing constants */
class
ConstantsInterface
{
public:
virtual
~
ConstantsInterface
()
{}
...
...
@@ -15,8 +16,14 @@ public:
static
int16_t
const
I16_CONSTANT
;
/** i32_constant has documentation. */
static
int32_t
const
I32_CONSTANT
;
/**
* i64_constant has long documentation.
* (Second line of multi-line documentation.
* Indented third line of multi-line documentation.)
*/
static
int64_t
const
I64_CONSTANT
;
static
float
const
F32_CONSTANT
;
...
...
test-suite/generated-src/cpp/empty_record.hpp
View file @
805c1eda
...
...
@@ -5,5 +5,10 @@
#include <utility>
/**
* Empty record
* (Second line of multi-line documentation.
* Indented third line of multi-line documentation.)
*/
struct
EmptyRecord
final
{
};
test-suite/generated-src/cpp/test_helpers.hpp
View file @
805c1eda
...
...
@@ -19,12 +19,23 @@
class
ClientInterface
;
class
UserToken
;
/**
* Helper methods used by various different tests.
* (Second line of multi-line documentation.
* Indented third line of multi-line documentation.)
*/
class
TestHelpers
{
public:
virtual
~
TestHelpers
()
{}
/** Method with documentation */
static
SetRecord
get_set_record
();
/**
* Method with long documentation
* (Second line of multi-line documentation.
* Indented third line of multi-line documentation.)
*/
static
bool
check_set_record
(
const
SetRecord
&
rec
);
static
PrimitiveList
get_primitive_list
();
...
...
test-suite/generated-src/java/com/dropbox/djinni/test/ClientInterface.java
View file @
805c1eda
...
...
@@ -6,6 +6,7 @@ package com.dropbox.djinni.test;
import
javax.annotation.CheckForNull
;
import
javax.annotation.Nonnull
;
/** Client interface */
public
abstract
class
ClientInterface
{
/** Returns record of given string */
@Nonnull
...
...
test-suite/generated-src/java/com/dropbox/djinni/test/ClientReturnedRecord.java
View file @
805c1eda
...
...
@@ -6,6 +6,7 @@ package com.dropbox.djinni.test;
import
javax.annotation.CheckForNull
;
import
javax.annotation.Nonnull
;
/** Record returned by a client */
public
final
class
ClientReturnedRecord
{
...
...
test-suite/generated-src/java/com/dropbox/djinni/test/Constants.java
View file @
805c1eda
...
...
@@ -8,6 +8,7 @@ import javax.annotation.Nonnull;
public
final
class
Constants
{
/** bool_constant has documentation. */
public
static
final
boolean
BOOL_CONSTANT
=
true
;
public
static
final
byte
I8_CONSTANT
=
1
;
...
...
@@ -20,6 +21,11 @@ public final class Constants {
public
static
final
float
F32_CONSTANT
=
5.0f
;
/**
* f64_constant has long documentation.
* (Second line of multi-line documentation.
* Indented third line of multi-line documentation.)
*/
public
static
final
double
F64_CONSTANT
=
5.0
;
@Nonnull
...
...
test-suite/generated-src/java/com/dropbox/djinni/test/ConstantsInterface.java
View file @
805c1eda
...
...
@@ -7,6 +7,7 @@ import java.util.concurrent.atomic.AtomicBoolean;
import
javax.annotation.CheckForNull
;
import
javax.annotation.Nonnull
;
/** Interface containing constants */
public
abstract
class
ConstantsInterface
{
public
static
final
boolean
BOOL_CONSTANT
=
true
;
...
...
@@ -14,8 +15,14 @@ public abstract class ConstantsInterface {
public
static
final
short
I16_CONSTANT
=
2
;
/** i32_constant has documentation. */
public
static
final
int
I32_CONSTANT
=
3
;
/**
* i64_constant has long documentation.
* (Second line of multi-line documentation.
* Indented third line of multi-line documentation.)
*/
public
static
final
long
I64_CONSTANT
=
4
;
public
static
final
float
F32_CONSTANT
=
5.0f
;
...
...
test-suite/generated-src/java/com/dropbox/djinni/test/EmptyRecord.java
View file @
805c1eda
...
...
@@ -6,6 +6,11 @@ package com.dropbox.djinni.test;
import
javax.annotation.CheckForNull
;
import
javax.annotation.Nonnull
;
/**
* Empty record
* (Second line of multi-line documentation.
* Indented third line of multi-line documentation.)
*/
public
final
class
EmptyRecord
{
...
...
test-suite/generated-src/java/com/dropbox/djinni/test/TestHelpers.java
View file @
805c1eda
...
...
@@ -8,10 +8,21 @@ import java.util.concurrent.atomic.AtomicBoolean;
import
javax.annotation.CheckForNull
;
import
javax.annotation.Nonnull
;
/**
* Helper methods used by various different tests.
* (Second line of multi-line documentation.
* Indented third line of multi-line documentation.)
*/
public
abstract
class
TestHelpers
{
/** Method with documentation */
@Nonnull
public
static
native
SetRecord
getSetRecord
();
/**
* Method with long documentation
* (Second line of multi-line documentation.
* Indented third line of multi-line documentation.)
*/
public
static
native
boolean
checkSetRecord
(
@Nonnull
SetRecord
rec
);
@Nonnull
...
...
test-suite/generated-src/objc/DBClientInterface.h
View file @
805c1eda
...
...
@@ -5,6 +5,7 @@
#import <Foundation/Foundation.h>
/** Client interface */
@protocol
DBClientInterface
/** Returns record of given string */
...
...
test-suite/generated-src/objc/DBClientReturnedRecord.h
View file @
805c1eda
...
...
@@ -3,6 +3,7 @@
#import <Foundation/Foundation.h>
/** Record returned by a client */
@interface
DBClientReturnedRecord
:
NSObject
-
(
nonnull
instancetype
)
initWithRecordId
:(
int64_t
)
recordId
content
:(
nonnull
NSString
*
)
content
...
...
test-suite/generated-src/objc/DBConstants.h
View file @
805c1eda
...
...
@@ -16,12 +16,18 @@
@end
/** bool_constant has documentation. */
extern
BOOL
const
DBConstantsBoolConstant
;
extern
int8_t
const
DBConstantsI8Constant
;
extern
int16_t
const
DBConstantsI16Constant
;
extern
int32_t
const
DBConstantsI32Constant
;
extern
int64_t
const
DBConstantsI64Constant
;
extern
float
const
DBConstantsF32Constant
;
/**
* f64_constant has long documentation.
* (Second line of multi-line documentation.
* Indented third line of multi-line documentation.)
*/
extern
double
const
DBConstantsF64Constant
;
extern
NSString
*
__nonnull
const
DBConstantsStringConstant
;
extern
NSNumber
*
__nullable
const
DBConstantsOptionalIntegerConstant
;
...
...
test-suite/generated-src/objc/DBConstantsInterface.h
View file @
805c1eda
...
...
@@ -6,11 +6,18 @@
extern
BOOL
const
DBConstantsInterfaceBoolConstant
;
extern
int8_t
const
DBConstantsInterfaceI8Constant
;
extern
int16_t
const
DBConstantsInterfaceI16Constant
;
/** i32_constant has documentation. */
extern
int32_t
const
DBConstantsInterfaceI32Constant
;
/**
* i64_constant has long documentation.
* (Second line of multi-line documentation.
* Indented third line of multi-line documentation.)
*/
extern
int64_t
const
DBConstantsInterfaceI64Constant
;
extern
float
const
DBConstantsInterfaceF32Constant
;
extern
double
const
DBConstantsInterfaceF64Constant
;
/** Interface containing constants */
@interface
DBConstantsInterface
:
NSObject
-
(
void
)
dummy
;
...
...
test-suite/generated-src/objc/DBEmptyRecord.h
View file @
805c1eda
...
...
@@ -3,6 +3,11 @@
#import <Foundation/Foundation.h>
/**
* Empty record
* (Second line of multi-line documentation.
* Indented third line of multi-line documentation.)
*/
@interface
DBEmptyRecord
:
NSObject
-
(
nonnull
instancetype
)
init
;
+
(
nonnull
instancetype
)
emptyRecord
;
...
...
test-suite/generated-src/objc/DBTestHelpers.h
View file @
805c1eda
...
...
@@ -12,10 +12,21 @@
@protocol
DBUserToken
;
/**
* Helper methods used by various different tests.
* (Second line of multi-line documentation.
* Indented third line of multi-line documentation.)
*/
@interface
DBTestHelpers
:
NSObject
/** Method with documentation */
+
(
nonnull
DBSetRecord
*
)
getSetRecord
;
/**
* Method with long documentation
* (Second line of multi-line documentation.
* Indented third line of multi-line documentation.)
*/
+
(
BOOL
)
checkSetRecord
:(
nonnull
DBSetRecord
*
)
rec
;
+
(
nonnull
DBPrimitiveList
*
)
getPrimitiveList
;
...
...
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