Skip to content

Commit

Permalink
rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
KhalilBellakrid committed Mar 8, 2018
1 parent 7e0ef65 commit 6e9464d
Show file tree
Hide file tree
Showing 30 changed files with 85 additions and 80 deletions.
2 changes: 2 additions & 0 deletions test-suite/djinni/all.djinni
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
@import "common.djinni"

@import "enum_flags.djinni"

@import "vendor/third-party/date.djinni"
@import "third-party/duration.djinni"
30 changes: 0 additions & 30 deletions test-suite/djinni/enum.djinni
Original file line number Diff line number Diff line change
Expand Up @@ -26,33 +26,3 @@ enum_usage_interface = interface +c +j +o {
s(s: set<color>): set<color>;
m(m: map<color, color>): map<color, color>;
}

access_flags = flags {
nobody = none;
owner_read;
owner_write;
owner_execute;
group_read;
group_write;
group_execute;
system_read;
system_write;
system_execute;
everybody = all;
}

empty_flags = flags {
none = none;
all = all;
}

flag_roundtrip = interface +c {
static roundtrip_access(flag: access_flags): access_flags;
static roundtrip_empty(flag: empty_flags): empty_flags;
static roundtrip_access_boxed(flag: optional<access_flags>): optional<access_flags>;
static roundtrip_empty_boxed(flag: optional<empty_flags>): optional<empty_flags>;
}

record_with_flags = record {
access: access_flags;
}
29 changes: 29 additions & 0 deletions test-suite/djinni/enum_flags.djinni
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
access_flags = flags {
nobody = none;
owner_read;
owner_write;
owner_execute;
group_read;
group_write;
group_execute;
system_read;
system_write;
system_execute;
everybody = all;
}

empty_flags = flags {
none = none;
all = all;
}

flag_roundtrip = interface +c {
static roundtrip_access(flag: access_flags): access_flags;
static roundtrip_empty(flag: empty_flags): empty_flags;
static roundtrip_access_boxed(flag: optional<access_flags>): optional<access_flags>;
static roundtrip_empty_boxed(flag: optional<empty_flags>): optional<empty_flags>;
}

record_with_flags = record {
access: access_flags;
}
2 changes: 1 addition & 1 deletion test-suite/generated-src/cpp/access_flags.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// AUTOGENERATED FILE - DO NOT MODIFY!
// This file generated by Djinni from enum.djinni
// This file generated by Djinni from enum_flags.djinni

#pragma once

Expand Down
2 changes: 1 addition & 1 deletion test-suite/generated-src/cpp/empty_flags.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// AUTOGENERATED FILE - DO NOT MODIFY!
// This file generated by Djinni from enum.djinni
// This file generated by Djinni from enum_flags.djinni

#pragma once

Expand Down
2 changes: 1 addition & 1 deletion test-suite/generated-src/cpp/flag_roundtrip.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// AUTOGENERATED FILE - DO NOT MODIFY!
// This file generated by Djinni from enum.djinni
// This file generated by Djinni from enum_flags.djinni

#pragma once

Expand Down
2 changes: 1 addition & 1 deletion test-suite/generated-src/cpp/record_with_flags.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// AUTOGENERATED FILE - DO NOT MODIFY!
// This file generated by Djinni from enum.djinni
// This file generated by Djinni from enum_flags.djinni

#pragma once

Expand Down
4 changes: 4 additions & 0 deletions test-suite/generated-src/inFileList.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,13 @@ djinni/extended_record.djinni
<<<<<<< HEAD
djinni/varnames.djinni
djinni/relative_paths.djinni
<<<<<<< HEAD
djinni/date.djinni
djinni/date.yaml
=======
=======
djinni/enum_flags.djinni
>>>>>>> Separate `flags` to `enum_flags.djinni` (#346)
djinni/vendor/third-party/date.djinni
djinni/vendor/third-party/date.yaml
>>>>>>> Add test case for relative path not using include paths
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// AUTOGENERATED FILE - DO NOT MODIFY!
// This file generated by Djinni from enum.djinni
// This file generated by Djinni from enum_flags.djinni

package com.dropbox.djinni.test;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// AUTOGENERATED FILE - DO NOT MODIFY!
// This file generated by Djinni from enum.djinni
// This file generated by Djinni from enum_flags.djinni

package com.dropbox.djinni.test;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// AUTOGENERATED FILE - DO NOT MODIFY!
// This file generated by Djinni from enum.djinni
// This file generated by Djinni from enum_flags.djinni

package com.dropbox.djinni.test;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// AUTOGENERATED FILE - DO NOT MODIFY!
// This file generated by Djinni from enum.djinni
// This file generated by Djinni from enum_flags.djinni

package com.dropbox.djinni.test;

Expand Down
2 changes: 1 addition & 1 deletion test-suite/generated-src/jni/NativeAccessFlags.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// AUTOGENERATED FILE - DO NOT MODIFY!
// This file generated by Djinni from enum.djinni
// This file generated by Djinni from enum_flags.djinni

#pragma once

Expand Down
2 changes: 1 addition & 1 deletion test-suite/generated-src/jni/NativeEmptyFlags.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// AUTOGENERATED FILE - DO NOT MODIFY!
// This file generated by Djinni from enum.djinni
// This file generated by Djinni from enum_flags.djinni

#pragma once

Expand Down
2 changes: 1 addition & 1 deletion test-suite/generated-src/jni/NativeFlagRoundtrip.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// AUTOGENERATED FILE - DO NOT MODIFY!
// This file generated by Djinni from enum.djinni
// This file generated by Djinni from enum_flags.djinni

#include "NativeFlagRoundtrip.hpp" // my header
#include "Marshal.hpp"
Expand Down
2 changes: 1 addition & 1 deletion test-suite/generated-src/jni/NativeFlagRoundtrip.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// AUTOGENERATED FILE - DO NOT MODIFY!
// This file generated by Djinni from enum.djinni
// This file generated by Djinni from enum_flags.djinni

#pragma once

Expand Down
2 changes: 1 addition & 1 deletion test-suite/generated-src/jni/NativeRecordWithFlags.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// AUTOGENERATED FILE - DO NOT MODIFY!
// This file generated by Djinni from enum.djinni
// This file generated by Djinni from enum_flags.djinni

#include "NativeRecordWithFlags.hpp" // my header
#include "NativeAccessFlags.hpp"
Expand Down
2 changes: 1 addition & 1 deletion test-suite/generated-src/jni/NativeRecordWithFlags.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// AUTOGENERATED FILE - DO NOT MODIFY!
// This file generated by Djinni from enum.djinni
// This file generated by Djinni from enum_flags.djinni

#pragma once

Expand Down
2 changes: 1 addition & 1 deletion test-suite/generated-src/objc/DBAccessFlags+Private.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// AUTOGENERATED FILE - DO NOT MODIFY!
// This file generated by Djinni from enum.djinni
// This file generated by Djinni from enum_flags.djinni

#include "access_flags.hpp"
#import "DJIMarshal+Private.h"
Expand Down
2 changes: 1 addition & 1 deletion test-suite/generated-src/objc/DBAccessFlags.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// AUTOGENERATED FILE - DO NOT MODIFY!
// This file generated by Djinni from enum.djinni
// This file generated by Djinni from enum_flags.djinni

#import <Foundation/Foundation.h>

Expand Down
2 changes: 1 addition & 1 deletion test-suite/generated-src/objc/DBEmptyFlags+Private.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// AUTOGENERATED FILE - DO NOT MODIFY!
// This file generated by Djinni from enum.djinni
// This file generated by Djinni from enum_flags.djinni

#include "empty_flags.hpp"
#import "DJIMarshal+Private.h"
Expand Down
2 changes: 1 addition & 1 deletion test-suite/generated-src/objc/DBEmptyFlags.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// AUTOGENERATED FILE - DO NOT MODIFY!
// This file generated by Djinni from enum.djinni
// This file generated by Djinni from enum_flags.djinni

#import <Foundation/Foundation.h>

Expand Down
2 changes: 1 addition & 1 deletion test-suite/generated-src/objc/DBFlagRoundtrip+Private.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// AUTOGENERATED FILE - DO NOT MODIFY!
// This file generated by Djinni from enum.djinni
// This file generated by Djinni from enum_flags.djinni

#include "flag_roundtrip.hpp"
#include <memory>
Expand Down
2 changes: 1 addition & 1 deletion test-suite/generated-src/objc/DBFlagRoundtrip+Private.mm
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// AUTOGENERATED FILE - DO NOT MODIFY!
// This file generated by Djinni from enum.djinni
// This file generated by Djinni from enum_flags.djinni

#import "DBFlagRoundtrip+Private.h"
#import "DBFlagRoundtrip.h"
Expand Down
2 changes: 1 addition & 1 deletion test-suite/generated-src/objc/DBFlagRoundtrip.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// AUTOGENERATED FILE - DO NOT MODIFY!
// This file generated by Djinni from enum.djinni
// This file generated by Djinni from enum_flags.djinni

#import "DBAccessFlags.h"
#import "DBEmptyFlags.h"
Expand Down
2 changes: 1 addition & 1 deletion test-suite/generated-src/objc/DBRecordWithFlags+Private.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// AUTOGENERATED FILE - DO NOT MODIFY!
// This file generated by Djinni from enum.djinni
// This file generated by Djinni from enum_flags.djinni

#import "DBRecordWithFlags.h"
#include "record_with_flags.hpp"
Expand Down
2 changes: 1 addition & 1 deletion test-suite/generated-src/objc/DBRecordWithFlags+Private.mm
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// AUTOGENERATED FILE - DO NOT MODIFY!
// This file generated by Djinni from enum.djinni
// This file generated by Djinni from enum_flags.djinni

#import "DBRecordWithFlags+Private.h"
#import "DBAccessFlags+Private.h"
Expand Down
2 changes: 1 addition & 1 deletion test-suite/generated-src/objc/DBRecordWithFlags.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// AUTOGENERATED FILE - DO NOT MODIFY!
// This file generated by Djinni from enum.djinni
// This file generated by Djinni from enum_flags.djinni

#import "DBAccessFlags.h"
#import <Foundation/Foundation.h>
Expand Down
2 changes: 1 addition & 1 deletion test-suite/generated-src/objc/DBRecordWithFlags.mm
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// AUTOGENERATED FILE - DO NOT MODIFY!
// This file generated by Djinni from enum.djinni
// This file generated by Djinni from enum_flags.djinni

#import "DBRecordWithFlags.h"

Expand Down
50 changes: 25 additions & 25 deletions test-suite/generated-src/outFileList.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ djinni-output-temp/cpp/record_with_duration_and_derivings.cpp
djinni-output-temp/cpp/date_record.hpp
djinni-output-temp/cpp/date_record.cpp
djinni-output-temp/cpp/map_date_record.hpp
djinni-output-temp/cpp/access_flags.hpp
djinni-output-temp/cpp/empty_flags.hpp
djinni-output-temp/cpp/flag_roundtrip.hpp
djinni-output-temp/cpp/record_with_flags.hpp
djinni-output-temp/cpp/_varname_record_.hpp
djinni-output-temp/cpp/_varname_interface_.hpp
djinni-output-temp/cpp/extended_record_base.hpp
Expand Down Expand Up @@ -35,10 +39,6 @@ djinni-output-temp/cpp/user_token.hpp
djinni-output-temp/cpp/color.hpp
djinni-output-temp/cpp/enum_usage_record.hpp
djinni-output-temp/cpp/enum_usage_interface.hpp
djinni-output-temp/cpp/access_flags.hpp
djinni-output-temp/cpp/empty_flags.hpp
djinni-output-temp/cpp/flag_roundtrip.hpp
djinni-output-temp/cpp/record_with_flags.hpp
djinni-output-temp/cpp/client_returned_record.hpp
djinni-output-temp/cpp/client_interface.hpp
djinni-output-temp/cpp/reverse_client_interface.hpp
Expand All @@ -56,6 +56,10 @@ djinni-output-temp/java/TestDuration.java
djinni-output-temp/java/RecordWithDurationAndDerivings.java
djinni-output-temp/java/DateRecord.java
djinni-output-temp/java/MapDateRecord.java
djinni-output-temp/java/AccessFlags.java
djinni-output-temp/java/EmptyFlags.java
djinni-output-temp/java/FlagRoundtrip.java
djinni-output-temp/java/RecordWithFlags.java
djinni-output-temp/java/VarnameRecord.java
djinni-output-temp/java/VarnameInterface.java
djinni-output-temp/java/ExtendedRecord.java
Expand All @@ -81,10 +85,6 @@ djinni-output-temp/java/UserToken.java
djinni-output-temp/java/Color.java
djinni-output-temp/java/EnumUsageRecord.java
djinni-output-temp/java/EnumUsageInterface.java
djinni-output-temp/java/AccessFlags.java
djinni-output-temp/java/EmptyFlags.java
djinni-output-temp/java/FlagRoundtrip.java
djinni-output-temp/java/RecordWithFlags.java
djinni-output-temp/java/ClientReturnedRecord.java
djinni-output-temp/java/ClientInterface.java
djinni-output-temp/java/ReverseClientInterface.java
Expand All @@ -104,6 +104,12 @@ djinni-output-temp/jni/NativeDateRecord.hpp
djinni-output-temp/jni/NativeDateRecord.cpp
djinni-output-temp/jni/NativeMapDateRecord.hpp
djinni-output-temp/jni/NativeMapDateRecord.cpp
djinni-output-temp/jni/NativeAccessFlags.hpp
djinni-output-temp/jni/NativeEmptyFlags.hpp
djinni-output-temp/jni/NativeFlagRoundtrip.hpp
djinni-output-temp/jni/NativeFlagRoundtrip.cpp
djinni-output-temp/jni/NativeRecordWithFlags.hpp
djinni-output-temp/jni/NativeRecordWithFlags.cpp
djinni-output-temp/jni/NativeVarnameRecord.hpp
djinni-output-temp/jni/NativeVarnameRecord.cpp
djinni-output-temp/jni/NativeVarnameInterface.hpp
Expand Down Expand Up @@ -153,12 +159,6 @@ djinni-output-temp/jni/NativeEnumUsageRecord.hpp
djinni-output-temp/jni/NativeEnumUsageRecord.cpp
djinni-output-temp/jni/NativeEnumUsageInterface.hpp
djinni-output-temp/jni/NativeEnumUsageInterface.cpp
djinni-output-temp/jni/NativeAccessFlags.hpp
djinni-output-temp/jni/NativeEmptyFlags.hpp
djinni-output-temp/jni/NativeFlagRoundtrip.hpp
djinni-output-temp/jni/NativeFlagRoundtrip.cpp
djinni-output-temp/jni/NativeRecordWithFlags.hpp
djinni-output-temp/jni/NativeRecordWithFlags.cpp
djinni-output-temp/jni/NativeClientReturnedRecord.hpp
djinni-output-temp/jni/NativeClientReturnedRecord.cpp
djinni-output-temp/jni/NativeClientInterface.hpp
Expand Down Expand Up @@ -188,6 +188,11 @@ djinni-output-temp/objc/DBDateRecord.h
djinni-output-temp/objc/DBDateRecord.mm
djinni-output-temp/objc/DBMapDateRecord.h
djinni-output-temp/objc/DBMapDateRecord.mm
djinni-output-temp/objc/DBAccessFlags.h
djinni-output-temp/objc/DBEmptyFlags.h
djinni-output-temp/objc/DBFlagRoundtrip.h
djinni-output-temp/objc/DBRecordWithFlags.h
djinni-output-temp/objc/DBRecordWithFlags.mm
djinni-output-temp/objc/DBVarnameRecord.h
djinni-output-temp/objc/DBVarnameRecord.mm
djinni-output-temp/objc/DBVarnameInterface.h
Expand Down Expand Up @@ -223,11 +228,6 @@ djinni-output-temp/objc/DBColor.h
djinni-output-temp/objc/DBEnumUsageRecord.h
djinni-output-temp/objc/DBEnumUsageRecord.mm
djinni-output-temp/objc/DBEnumUsageInterface.h
djinni-output-temp/objc/DBAccessFlags.h
djinni-output-temp/objc/DBEmptyFlags.h
djinni-output-temp/objc/DBFlagRoundtrip.h
djinni-output-temp/objc/DBRecordWithFlags.h
djinni-output-temp/objc/DBRecordWithFlags.mm
djinni-output-temp/objc/DBClientReturnedRecord.h
djinni-output-temp/objc/DBClientReturnedRecord.mm
djinni-output-temp/objc/DBClientInterface.h
Expand Down Expand Up @@ -255,6 +255,12 @@ djinni-output-temp/objc/DBDateRecord+Private.h
djinni-output-temp/objc/DBDateRecord+Private.mm
djinni-output-temp/objc/DBMapDateRecord+Private.h
djinni-output-temp/objc/DBMapDateRecord+Private.mm
djinni-output-temp/objc/DBAccessFlags+Private.h
djinni-output-temp/objc/DBEmptyFlags+Private.h
djinni-output-temp/objc/DBFlagRoundtrip+Private.h
djinni-output-temp/objc/DBFlagRoundtrip+Private.mm
djinni-output-temp/objc/DBRecordWithFlags+Private.h
djinni-output-temp/objc/DBRecordWithFlags+Private.mm
djinni-output-temp/objc/DBVarnameRecord+Private.h
djinni-output-temp/objc/DBVarnameRecord+Private.mm
djinni-output-temp/objc/DBVarnameInterface+Private.h
Expand Down Expand Up @@ -304,12 +310,6 @@ djinni-output-temp/objc/DBEnumUsageRecord+Private.h
djinni-output-temp/objc/DBEnumUsageRecord+Private.mm
djinni-output-temp/objc/DBEnumUsageInterface+Private.h
djinni-output-temp/objc/DBEnumUsageInterface+Private.mm
djinni-output-temp/objc/DBAccessFlags+Private.h
djinni-output-temp/objc/DBEmptyFlags+Private.h
djinni-output-temp/objc/DBFlagRoundtrip+Private.h
djinni-output-temp/objc/DBFlagRoundtrip+Private.mm
djinni-output-temp/objc/DBRecordWithFlags+Private.h
djinni-output-temp/objc/DBRecordWithFlags+Private.mm
djinni-output-temp/objc/DBClientReturnedRecord+Private.h
djinni-output-temp/objc/DBClientReturnedRecord+Private.mm
djinni-output-temp/objc/DBClientInterface+Private.h
Expand Down

0 comments on commit 6e9464d

Please sign in to comment.