Commit c4171880 authored by Damien DeVille's avatar Damien DeVille Committed by Jacob Potter

Swap position of the const qualifier for constants in djinni generated objc code

parent 82c6e47e
...@@ -123,34 +123,38 @@ class ObjcGenerator(spec: Spec) extends Generator(spec) { ...@@ -123,34 +123,38 @@ class ObjcGenerator(spec: Spec) extends Generator(spec) {
def privateHeaderName(ident: String): String = idObjc.ty(ident) + "+Private." + spec.objcHeaderExt def privateHeaderName(ident: String): String = idObjc.ty(ident) + "+Private." + spec.objcHeaderExt
def bodyName(ident: String): String = idObjc.ty(ident) + "." + spec.objcExt def bodyName(ident: String): String = idObjc.ty(ident) + "." + spec.objcExt
def writeObjcConstVariable(w: IndentWriter, c: Const, s: String): Unit = c.ty.resolved.base match {
// MBinary | MList | MSet | MMap are not allowed for constants.
// Primitives should be `const type`. All others are pointers and should be `type * const`
case t: MPrimitive => w.w(s"const ${toObjcTypeDef(c.ty)}$s${idObjc.const(c.ident)}")
case _ => w.w(s"${toObjcTypeDef(c.ty)} const $s${idObjc.const(c.ident)}")
}
def generateObjcConstants(w: IndentWriter, consts: Seq[Const], selfName: String) = { def generateObjcConstants(w: IndentWriter, consts: Seq[Const], selfName: String) = {
def boxedPrimitive(ty: TypeRef): String = { def boxedPrimitive(ty: TypeRef): String = {
val (_, needRef) = toObjcType(ty) val (_, needRef) = toObjcType(ty)
if (needRef) "@" else "" if (needRef) "@" else ""
} }
def writeObjcConst(w: IndentWriter, ty: TypeRef, v: Any): Unit = v match { def writeObjcConstValue(w: IndentWriter, ty: TypeRef, v: Any): Unit = v match {
case l: Long => w.w(boxedPrimitive(ty) + l.toString) case l: Long => w.w(boxedPrimitive(ty) + l.toString)
case d: Double => w.w(boxedPrimitive(ty) + d.toString) case d: Double => w.w(boxedPrimitive(ty) + d.toString)
case b: Boolean => w.w(boxedPrimitive(ty) + (if (b) "YES" else "NO")) case b: Boolean => w.w(boxedPrimitive(ty) + (if (b) "YES" else "NO"))
case s: String => w.w("@" + s) case s: String => w.w("@" + s)
case e: EnumValue => w.w(idObjc.enum(e.ty + "_" + e.name)) case e: EnumValue => w.w(idObjc.enum(e.ty + "_" + e.name))
case v: ConstRef => ty.resolved.base match { case v: ConstRef => w.w(selfName + idObjc.const (v.name))
case MString => w.w("[" + selfName + idObjc.const (v.name) + " copy]")
case _ => w.w(selfName + idObjc.const (v.name))
}
case z: Map[_, _] => { // Value is record case z: Map[_, _] => { // Value is record
val recordMdef = ty.resolved.base.asInstanceOf[MDef] val recordMdef = ty.resolved.base.asInstanceOf[MDef]
val record = recordMdef.body.asInstanceOf[Record] val record = recordMdef.body.asInstanceOf[Record]
val vMap = z.asInstanceOf[Map[String, Any]] val vMap = z.asInstanceOf[Map[String, Any]]
val head = record.fields.head val head = record.fields.head
w.w(s"[[${idObjc.ty(recordMdef.name)} alloc] initWith${IdentStyle.camelUpper(head.ident)}:") w.w(s"[[${idObjc.ty(recordMdef.name)} alloc] initWith${IdentStyle.camelUpper(head.ident)}:")
writeObjcConst(w, head.ty, vMap.apply(head.ident)) writeObjcConstValue(w, head.ty, vMap.apply(head.ident))
w.nestedN(2) { w.nestedN(2) {
val skipFirst = SkipFirst() val skipFirst = SkipFirst()
for (f <- record.fields) skipFirst { for (f <- record.fields) skipFirst {
w.wl w.wl
w.w(s"${idObjc.field(f.ident)}:") w.w(s"${idObjc.field(f.ident)}:")
writeObjcConst(w, f.ty, vMap.apply(f.ident)) writeObjcConstValue(w, f.ty, vMap.apply(f.ident))
} }
} }
w.w("]") w.w("]")
...@@ -161,8 +165,9 @@ class ObjcGenerator(spec: Spec) extends Generator(spec) { ...@@ -161,8 +165,9 @@ class ObjcGenerator(spec: Spec) extends Generator(spec) {
w.wl("#pragma clang diagnostic ignored " + q("-Wunused-variable")) w.wl("#pragma clang diagnostic ignored " + q("-Wunused-variable"))
for (c <- consts) { for (c <- consts) {
w.wl w.wl
w.w(s"const ${toObjcTypeDef(c.ty)}$selfName${idObjc.const(c.ident)} = ") writeObjcConstVariable(w, c, selfName)
writeObjcConst(w, c.ty, c.value) w.w(s" = ")
writeObjcConstValue(w, c.ty, c.value)
w.wl(";") w.wl(";")
} }
w.wl w.wl
...@@ -201,7 +206,9 @@ class ObjcGenerator(spec: Spec) extends Generator(spec) { ...@@ -201,7 +206,9 @@ class ObjcGenerator(spec: Spec) extends Generator(spec) {
writeDoc(w, doc) writeDoc(w, doc)
for (c <- i.consts) { for (c <- i.consts) {
writeDoc(w, c.doc) writeDoc(w, c.doc)
w.wl(s"extern const ${toObjcTypeDef(c.ty)}$self${idObjc.const(c.ident)};") w.w(s"extern ")
writeObjcConstVariable(w, c, self)
w.wl(s";")
} }
w.wl w.wl
w.wl(s"@protocol $self") w.wl(s"@protocol $self")
...@@ -413,7 +420,9 @@ class ObjcGenerator(spec: Spec) extends Generator(spec) { ...@@ -413,7 +420,9 @@ class ObjcGenerator(spec: Spec) extends Generator(spec) {
writeDoc(w, doc) writeDoc(w, doc)
for (c <- r.consts) { for (c <- r.consts) {
writeDoc(w, c.doc) writeDoc(w, c.doc)
w.wl(s"extern const ${toObjcTypeDef(c.ty)}$noBaseSelf${idObjc.const(c.ident)};") w.w(s"extern ")
writeObjcConstVariable(w, c, noBaseSelf);
w.wl(s";")
} }
w.wl w.wl
w.wl(s"@interface $self : NSObject") w.wl(s"@interface $self : NSObject")
......
...@@ -9,3 +9,4 @@ ...@@ -9,3 +9,4 @@
@import "token.djinni" @import "token.djinni"
@import "test.djinni" @import "test.djinni"
@import "inttypes.djinni" @import "inttypes.djinni"
@import "constants.djinni"
constants = record {
some_integer: i32;
some_string: string;
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 f64_constant: f64 = 5.0;
const string_constant: string = "string-constant";
const optional_integer_constant: optional<i32> = 1;
const object_constant: constants = {
some_integer = i32_constant,
some_string = string_constant
};
}
// AUTOGENERATED FILE - DO NOT MODIFY!
// This file generated by Djinni from constants.djinni
#include "constants.hpp" // my header
const bool Constants::BOOL_CONSTANT = true;
const int8_t Constants::I8_CONSTANT = 1;
const int16_t Constants::I16_CONSTANT = 2;
const int32_t Constants::I32_CONSTANT = 3;
const int64_t Constants::I64_CONSTANT = 4;
const double Constants::F64_CONSTANT = 5.0;
const std::string Constants::STRING_CONSTANT = "string-constant";
const std::experimental::optional<int32_t> Constants::OPTIONAL_INTEGER_CONSTANT = 1;
const Constants Constants::OBJECT_CONSTANT = Constants(
Constants::I32_CONSTANT /* some_integer */ ,
Constants::STRING_CONSTANT /* some_string */ );
// AUTOGENERATED FILE - DO NOT MODIFY!
// This file generated by Djinni from constants.djinni
#pragma once
#include <cstdint>
#include <experimental/optional>
#include <string>
#include <utility>
struct Constants final {
static const bool BOOL_CONSTANT;
static const int8_t I8_CONSTANT;
static const int16_t I16_CONSTANT;
static const int32_t I32_CONSTANT;
static const int64_t I64_CONSTANT;
static const double F64_CONSTANT;
static const std::string STRING_CONSTANT;
static const std::experimental::optional<int32_t> OPTIONAL_INTEGER_CONSTANT;
static const Constants OBJECT_CONSTANT;
int32_t some_integer;
std::string some_string;
Constants(
int32_t some_integer,
std::string some_string) :
some_integer(std::move(some_integer)),
some_string(std::move(some_string)) {
}
};
// AUTOGENERATED FILE - DO NOT MODIFY!
// This file generated by Djinni from constants.djinni
package com.dropbox.djinni.test;
public final class Constants {
public static final boolean BOOL_CONSTANT = true;
public static final byte I8_CONSTANT = 1;
public static final short I16_CONSTANT = 2;
public static final int I32_CONSTANT = 3;
public static final long I64_CONSTANT = 4;
public static final double F64_CONSTANT = 5.0;
public static final String STRING_CONSTANT = "string-constant";
public static final Integer OPTIONAL_INTEGER_CONSTANT = 1;
public static final Constants OBJECT_CONSTANT = new Constants(
I32_CONSTANT /* mSomeInteger */ ,
STRING_CONSTANT /* mSomeString */ );
/*package*/ final int mSomeInteger;
/*package*/ final String mSomeString;
public Constants(
int someInteger,
String someString) {
this.mSomeInteger = someInteger;
this.mSomeString = someString;
}
public int getSomeInteger() {
return mSomeInteger;
}
public String getSomeString() {
return mSomeString;
}
}
// AUTOGENERATED FILE - DO NOT MODIFY!
// This file generated by Djinni from constants.djinni
#include "NativeConstants.hpp" // my header
#include "HI32.hpp"
#include "HString.hpp"
namespace djinni_generated {
jobject NativeConstants::toJava(JNIEnv* jniEnv, Constants c) {
jint j_some_integer = ::djinni::HI32::Unboxed::toJava(jniEnv, c.some_integer);
djinni::LocalRef<jstring> j_some_string(jniEnv, ::djinni::HString::toJava(jniEnv, c.some_string));
const auto & data = djinni::JniClass<::djinni_generated::NativeConstants>::get();
jobject r = jniEnv->NewObject(data.clazz.get(), data.jconstructor, j_some_integer, j_some_string.get());
djinni::jniExceptionCheck(jniEnv);
return r;
}
Constants NativeConstants::fromJava(JNIEnv* jniEnv, jobject j) {
assert(j != nullptr);
const auto & data = djinni::JniClass<::djinni_generated::NativeConstants>::get();
return Constants(
::djinni::HI32::Unboxed::fromJava(jniEnv, jniEnv->GetIntField(j, data.field_mSomeInteger)),
::djinni::HString::fromJava(jniEnv, djinni::LocalRef<jstring>(jniEnv, static_cast<jstring>(jniEnv->GetObjectField(j, data.field_mSomeString))).get()));
}
} // namespace djinni_generated
// AUTOGENERATED FILE - DO NOT MODIFY!
// This file generated by Djinni from constants.djinni
#pragma once
#include "constants.hpp"
#include "djinni_support.hpp"
namespace djinni_generated {
class NativeConstants final {
public:
using CppType = Constants;
using JniType = jobject;
static jobject toJava(JNIEnv*, Constants);
static Constants fromJava(JNIEnv*, jobject);
const djinni::GlobalRef<jclass> clazz { djinni::jniFindClass("com/dropbox/djinni/test/Constants") };
const jmethodID jconstructor { djinni::jniGetMethodID(clazz.get(), "<init>", "(ILjava/lang/String;)V") };
const jfieldID field_mSomeInteger { djinni::jniGetFieldID(clazz.get(), "mSomeInteger", "I") };
const jfieldID field_mSomeString { djinni::jniGetFieldID(clazz.get(), "mSomeString", "Ljava/lang/String;") };
private:
NativeConstants() {}
friend class djinni::JniClass<::djinni_generated::NativeConstants>;
};
} // namespace djinni_generated
// AUTOGENERATED FILE - DO NOT MODIFY!
// This file generated by Djinni from constants.djinni
#import "DBConstants.h"
#include "constants.hpp"
#import <Foundation/Foundation.h>
@interface DBConstants ()
- (id)initWithCppConstants:(const Constants &)constants;
- (Constants)cppConstants;
@end
// AUTOGENERATED FILE - DO NOT MODIFY!
// This file generated by Djinni from constants.djinni
#import <Foundation/Foundation.h>
@class DBConstants;
extern const BOOL DBConstantsBoolConstant;
extern const int8_t DBConstantsI8Constant;
extern const int16_t DBConstantsI16Constant;
extern const int32_t DBConstantsI32Constant;
extern const int64_t DBConstantsI64Constant;
extern const double DBConstantsF64Constant;
extern NSString * const DBConstantsStringConstant;
extern NSNumber * const DBConstantsOptionalIntegerConstant;
extern DBConstants * const DBConstantsObjectConstant;
@interface DBConstants : NSObject
- (id)initWithConstants:(DBConstants *)constants;
- (id)initWithSomeInteger:(int32_t)someInteger someString:(NSString *)someString;
@property (nonatomic, readonly) int32_t someInteger;
@property (nonatomic, readonly) NSString *someString;
@end
// AUTOGENERATED FILE - DO NOT MODIFY!
// This file generated by Djinni from constants.djinni
#import "DBConstants+Private.h"
#import "DBConstants+Private.h"
#import <Foundation/Foundation.h>
#include <utility>
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wunused-variable"
const BOOL DBConstantsBoolConstant = YES;
const int8_t DBConstantsI8Constant = 1;
const int16_t DBConstantsI16Constant = 2;
const int32_t DBConstantsI32Constant = 3;
const int64_t DBConstantsI64Constant = 4;
const double DBConstantsF64Constant = 5.0;
NSString * const DBConstantsStringConstant = @"string-constant";
NSNumber * const DBConstantsOptionalIntegerConstant = @1;
DBConstants * const DBConstantsObjectConstant = [[DBConstants alloc] initWithSomeInteger:DBConstantsI32Constant
someString:DBConstantsStringConstant];
#pragma clang diagnostic pop
static_assert(__has_feature(objc_arc), "Djinni requires ARC to be enabled for this file");
@implementation DBConstants
- (id)initWithConstants:(DBConstants *)constants
{
if (self = [super init]) {
_someInteger = constants.someInteger;
_someString = [constants.someString copy];
}
return self;
}
- (id)initWithSomeInteger:(int32_t)someInteger someString:(NSString *)someString
{
if (self = [super init]) {
_someInteger = someInteger;
_someString = [someString copy];
}
return self;
}
- (id)initWithCppConstants:(const Constants &)constants
{
if (self = [super init]) {
_someInteger = constants.some_integer;
_someString = [[NSString alloc] initWithBytes:constants.some_string.data()
length:constants.some_string.length()
encoding:NSUTF8StringEncoding];
}
return self;
}
- (Constants)cppConstants
{
int32_t someInteger = _someInteger;
std::string someString([_someString UTF8String], [_someString lengthOfBytesUsingEncoding:NSUTF8StringEncoding]);
return Constants(
std::move(someInteger),
std::move(someString));
}
@end
#import "DBConstants.h"
#import <XCTest/XCTest.h>
@interface DBConstantTests : XCTestCase
@end
@implementation DBConstantTests
- (void)methodThatTakesString:(__unused NSString *)string
{
}
- (void)testCallingMethodThatTakesStringWithConstant
{
[self methodThatTakesString:DBConstantsStringConstant];
}
@end
...@@ -35,6 +35,9 @@ ...@@ -35,6 +35,9 @@
65BAE70C19A6C7100035F775 /* DBRecordWithDerivings.mm in Sources */ = {isa = PBXBuildFile; fileRef = 65BAE6FC19A6C7100035F775 /* DBRecordWithDerivings.mm */; }; 65BAE70C19A6C7100035F775 /* DBRecordWithDerivings.mm in Sources */ = {isa = PBXBuildFile; fileRef = 65BAE6FC19A6C7100035F775 /* DBRecordWithDerivings.mm */; };
65BAE70D19A6C7100035F775 /* DBRecordWithNestedDerivings.mm in Sources */ = {isa = PBXBuildFile; fileRef = 65BAE6FF19A6C7100035F775 /* DBRecordWithNestedDerivings.mm */; }; 65BAE70D19A6C7100035F775 /* DBRecordWithNestedDerivings.mm in Sources */ = {isa = PBXBuildFile; fileRef = 65BAE6FF19A6C7100035F775 /* DBRecordWithNestedDerivings.mm */; };
65BAE70E19A6C7100035F775 /* DBSetRecord.mm in Sources */ = {isa = PBXBuildFile; fileRef = 65BAE70219A6C7100035F775 /* DBSetRecord.mm */; }; 65BAE70E19A6C7100035F775 /* DBSetRecord.mm in Sources */ = {isa = PBXBuildFile; fileRef = 65BAE70219A6C7100035F775 /* DBSetRecord.mm */; };
6D66A8A91A3B09F000B312E8 /* DBConstantTests.mm in Sources */ = {isa = PBXBuildFile; fileRef = 6D66A8A81A3B09F000B312E8 /* DBConstantTests.mm */; };
6D66A8AD1A3B0A3200B312E8 /* DBConstants.mm in Sources */ = {isa = PBXBuildFile; fileRef = 6D66A8AB1A3B0A3200B312E8 /* DBConstants.mm */; };
6D66A8B01A3B0A7C00B312E8 /* constants.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6D66A8AE1A3B0A7C00B312E8 /* constants.cpp */; };
A2059B6219DF7DDE006A2896 /* DBColorTranslator.mm in Sources */ = {isa = PBXBuildFile; fileRef = A2059B6019DF7DDE006A2896 /* DBColorTranslator.mm */; }; A2059B6219DF7DDE006A2896 /* DBColorTranslator.mm in Sources */ = {isa = PBXBuildFile; fileRef = A2059B6019DF7DDE006A2896 /* DBColorTranslator.mm */; };
A227B6A91A0D79F10003BBAC /* assorted_integers.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A227B6A71A0D79F10003BBAC /* assorted_integers.cpp */; }; A227B6A91A0D79F10003BBAC /* assorted_integers.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A227B6A71A0D79F10003BBAC /* assorted_integers.cpp */; };
A227B6AD1A0D7A290003BBAC /* DBAssortedIntegers.mm in Sources */ = {isa = PBXBuildFile; fileRef = A227B6AB1A0D7A290003BBAC /* DBAssortedIntegers.mm */; }; A227B6AD1A0D7A290003BBAC /* DBAssortedIntegers.mm in Sources */ = {isa = PBXBuildFile; fileRef = A227B6AB1A0D7A290003BBAC /* DBAssortedIntegers.mm */; };
...@@ -134,6 +137,12 @@ ...@@ -134,6 +137,12 @@
65BAE70019A6C7100035F775 /* DBSetRecord+Private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "DBSetRecord+Private.h"; sourceTree = "<group>"; }; 65BAE70019A6C7100035F775 /* DBSetRecord+Private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "DBSetRecord+Private.h"; sourceTree = "<group>"; };
65BAE70119A6C7100035F775 /* DBSetRecord.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DBSetRecord.h; sourceTree = "<group>"; }; 65BAE70119A6C7100035F775 /* DBSetRecord.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DBSetRecord.h; sourceTree = "<group>"; };
65BAE70219A6C7100035F775 /* DBSetRecord.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = DBSetRecord.mm; sourceTree = "<group>"; }; 65BAE70219A6C7100035F775 /* DBSetRecord.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = DBSetRecord.mm; sourceTree = "<group>"; };
6D66A8A81A3B09F000B312E8 /* DBConstantTests.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = DBConstantTests.mm; sourceTree = "<group>"; };
6D66A8AA1A3B0A3200B312E8 /* DBConstants.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DBConstants.h; path = "../../generated-src/objc/DBConstants.h"; sourceTree = "<group>"; };
6D66A8AB1A3B0A3200B312E8 /* DBConstants.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = DBConstants.mm; path = "../../generated-src/objc/DBConstants.mm"; sourceTree = "<group>"; };
6D66A8AC1A3B0A3200B312E8 /* DBConstants+Private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "DBConstants+Private.h"; path = "../../generated-src/objc/DBConstants+Private.h"; sourceTree = "<group>"; };
6D66A8AE1A3B0A7C00B312E8 /* constants.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = constants.cpp; path = "../../generated-src/cpp/constants.cpp"; sourceTree = "<group>"; };
6D66A8AF1A3B0A7C00B312E8 /* constants.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = constants.hpp; path = "../../generated-src/cpp/constants.hpp"; sourceTree = "<group>"; };
A2059B5E19DF7DBA006A2896 /* color.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = color.hpp; sourceTree = "<group>"; }; A2059B5E19DF7DBA006A2896 /* color.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = color.hpp; sourceTree = "<group>"; };
A2059B5F19DF7DDE006A2896 /* DBColor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DBColor.h; sourceTree = "<group>"; }; A2059B5F19DF7DDE006A2896 /* DBColor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DBColor.h; sourceTree = "<group>"; };
A2059B6019DF7DDE006A2896 /* DBColorTranslator.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = DBColorTranslator.mm; sourceTree = "<group>"; }; A2059B6019DF7DDE006A2896 /* DBColorTranslator.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = DBColorTranslator.mm; sourceTree = "<group>"; };
...@@ -226,6 +235,7 @@ ...@@ -226,6 +235,7 @@
6536CD7F19A6C99800DD7715 /* DBRecordWithDerivingsCppTests.mm */, 6536CD7F19A6C99800DD7715 /* DBRecordWithDerivingsCppTests.mm */,
6536CD8019A6C99800DD7715 /* DBRecordWithDerivingsObjcTests.mm */, 6536CD8019A6C99800DD7715 /* DBRecordWithDerivingsObjcTests.mm */,
6536CD8119A6C99800DD7715 /* DBSetRecordTests.mm */, 6536CD8119A6C99800DD7715 /* DBSetRecordTests.mm */,
6D66A8A81A3B09F000B312E8 /* DBConstantTests.mm */,
6536CD8219A6C99800DD7715 /* InfoPlist.strings */, 6536CD8219A6C99800DD7715 /* InfoPlist.strings */,
6536CD8419A6C99800DD7715 /* DjinniObjcTestTests-Info.plist */, 6536CD8419A6C99800DD7715 /* DjinniObjcTestTests-Info.plist */,
); );
...@@ -273,6 +283,8 @@ ...@@ -273,6 +283,8 @@
A227B6A81A0D79F10003BBAC /* assorted_integers.hpp */, A227B6A81A0D79F10003BBAC /* assorted_integers.hpp */,
A2CAD0871A16CA1800080DF0 /* token.hpp */, A2CAD0871A16CA1800080DF0 /* token.hpp */,
A2059B5E19DF7DBA006A2896 /* color.hpp */, A2059B5E19DF7DBA006A2896 /* color.hpp */,
6D66A8AE1A3B0A7C00B312E8 /* constants.cpp */,
6D66A8AF1A3B0A7C00B312E8 /* constants.hpp */,
A278D45119BA3428006FD937 /* test_helpers.hpp */, A278D45119BA3428006FD937 /* test_helpers.hpp */,
65BAE6D719A6C7100035F775 /* client_interface.hpp */, 65BAE6D719A6C7100035F775 /* client_interface.hpp */,
65BAE6D819A6C7100035F775 /* client_returned_record.hpp */, 65BAE6D819A6C7100035F775 /* client_returned_record.hpp */,
...@@ -304,6 +316,9 @@ ...@@ -304,6 +316,9 @@
A2059B5F19DF7DDE006A2896 /* DBColor.h */, A2059B5F19DF7DDE006A2896 /* DBColor.h */,
A2059B6019DF7DDE006A2896 /* DBColorTranslator.mm */, A2059B6019DF7DDE006A2896 /* DBColorTranslator.mm */,
A2059B6119DF7DDE006A2896 /* DBColorTranslator+Private.h */, A2059B6119DF7DDE006A2896 /* DBColorTranslator+Private.h */,
6D66A8AA1A3B0A3200B312E8 /* DBConstants.h */,
6D66A8AB1A3B0A3200B312E8 /* DBConstants.mm */,
6D66A8AC1A3B0A3200B312E8 /* DBConstants+Private.h */,
A278D44C19BA33CB006FD937 /* DBTestHelpers.h */, A278D44C19BA33CB006FD937 /* DBTestHelpers.h */,
A278D44D19BA33CB006FD937 /* DBTestHelpersCppProxy.h */, A278D44D19BA33CB006FD937 /* DBTestHelpersCppProxy.h */,
A278D44E19BA33CB006FD937 /* DBTestHelpersCppProxy.mm */, A278D44E19BA33CB006FD937 /* DBTestHelpersCppProxy.mm */,
...@@ -429,6 +444,7 @@ ...@@ -429,6 +444,7 @@
6536CD6F19A6C82200DD7715 /* DJIWeakPtrWrapper.mm in Sources */, 6536CD6F19A6C82200DD7715 /* DJIWeakPtrWrapper.mm in Sources */,
A21557A91A16DC5000084E93 /* DBTokenCppProxy.mm in Sources */, A21557A91A16DC5000084E93 /* DBTokenCppProxy.mm in Sources */,
65BAE70819A6C7100035F775 /* DBMapListRecord.mm in Sources */, 65BAE70819A6C7100035F775 /* DBMapListRecord.mm in Sources */,
6D66A8B01A3B0A7C00B312E8 /* constants.cpp in Sources */,
65BAE70919A6C7100035F775 /* DBMapRecord.mm in Sources */, 65BAE70919A6C7100035F775 /* DBMapRecord.mm in Sources */,
A278D45319BA3601006FD937 /* test_helpers.cpp in Sources */, A278D45319BA3601006FD937 /* test_helpers.cpp in Sources */,
65BAE70C19A6C7100035F775 /* DBRecordWithDerivings.mm in Sources */, 65BAE70C19A6C7100035F775 /* DBRecordWithDerivings.mm in Sources */,
...@@ -439,6 +455,7 @@ ...@@ -439,6 +455,7 @@
65BAE70E19A6C7100035F775 /* DBSetRecord.mm in Sources */, 65BAE70E19A6C7100035F775 /* DBSetRecord.mm in Sources */,
A2059B6219DF7DDE006A2896 /* DBColorTranslator.mm in Sources */, A2059B6219DF7DDE006A2896 /* DBColorTranslator.mm in Sources */,
65BAE70D19A6C7100035F775 /* DBRecordWithNestedDerivings.mm in Sources */, 65BAE70D19A6C7100035F775 /* DBRecordWithNestedDerivings.mm in Sources */,
6D66A8AD1A3B0A3200B312E8 /* DBConstants.mm in Sources */,
65BAE70619A6C7100035F775 /* DBClientReturnedRecord.mm in Sources */, 65BAE70619A6C7100035F775 /* DBClientReturnedRecord.mm in Sources */,
65BAE70719A6C7100035F775 /* DBCppExceptionCppProxy.mm in Sources */, 65BAE70719A6C7100035F775 /* DBCppExceptionCppProxy.mm in Sources */,
65BAE70419A6C7100035F775 /* record_with_nested_derivings.cpp in Sources */, 65BAE70419A6C7100035F775 /* record_with_nested_derivings.cpp in Sources */,
...@@ -454,6 +471,7 @@ ...@@ -454,6 +471,7 @@
isa = PBXSourcesBuildPhase; isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647; buildActionMask = 2147483647;
files = ( files = (
6D66A8A91A3B09F000B312E8 /* DBConstantTests.mm in Sources */,
6536CD9219A6C9A800DD7715 /* DBRecordWithDerivingsCppTests.mm in Sources */, 6536CD9219A6C9A800DD7715 /* DBRecordWithDerivingsCppTests.mm in Sources */,
6536CD9119A6C9A800DD7715 /* DBPrimitiveListTests.mm in Sources */, 6536CD9119A6C9A800DD7715 /* DBPrimitiveListTests.mm in Sources */,
6536CD8D19A6C9A800DD7715 /* DBClientInterfaceTests.mm in Sources */, 6536CD8D19A6C9A800DD7715 /* DBClientInterfaceTests.mm in Sources */,
...@@ -581,6 +599,10 @@ ...@@ -581,6 +599,10 @@
PRODUCT_NAME = DjinniObjcTest; PRODUCT_NAME = DjinniObjcTest;
SKIP_INSTALL = YES; SKIP_INSTALL = YES;
VERSIONING_SYSTEM = ""; VERSIONING_SYSTEM = "";
WARNING_CFLAGS = (
"-Wextra",
"-Wall",
);
}; };
name = Debug; name = Debug;
}; };
...@@ -598,6 +620,10 @@ ...@@ -598,6 +620,10 @@
PRODUCT_NAME = DjinniObjcTest; PRODUCT_NAME = DjinniObjcTest;
SKIP_INSTALL = YES; SKIP_INSTALL = YES;
VERSIONING_SYSTEM = ""; VERSIONING_SYSTEM = "";
WARNING_CFLAGS = (
"-Wextra",
"-Wall",
);
}; };
name = Release; name = Release;
}; };
...@@ -617,6 +643,10 @@ ...@@ -617,6 +643,10 @@
); );
INFOPLIST_FILE = "../handwritten-src/objc/tests/DjinniObjcTestTests-Info.plist"; INFOPLIST_FILE = "../handwritten-src/objc/tests/DjinniObjcTestTests-Info.plist";
PRODUCT_NAME = DjinniObjcTestTests; PRODUCT_NAME = DjinniObjcTestTests;
WARNING_CFLAGS = (
"-Wextra",
"-Wall",
);
WRAPPER_EXTENSION = xctest; WRAPPER_EXTENSION = xctest;
}; };
name = Debug; name = Debug;
...@@ -633,6 +663,10 @@ ...@@ -633,6 +663,10 @@
GCC_PREFIX_HEADER = ""; GCC_PREFIX_HEADER = "";
INFOPLIST_FILE = "../handwritten-src/objc/tests/DjinniObjcTestTests-Info.plist"; INFOPLIST_FILE = "../handwritten-src/objc/tests/DjinniObjcTestTests-Info.plist";
PRODUCT_NAME = DjinniObjcTestTests; PRODUCT_NAME = DjinniObjcTestTests;
WARNING_CFLAGS = (
"-Wextra",
"-Wall",
);
WRAPPER_EXTENSION = xctest; WRAPPER_EXTENSION = xctest;
}; };
name = Release; name = Release;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment