Home
last modified time | relevance | path

Searched refs:convert (Results 1 – 25 of 230) sorted by relevance

12345678910

/expo/packages/expo-modules-core/android/src/test/java/expo/modules/kotlin/types/
H A DEnumTypeConverterTest.kt22 fun `should convert string to enum without parameter`() { in should convert string to enum without parameter()
28 Truth.assertThat(converter.convert(v1)).isSameInstanceAs(EnumWithoutParameter.VALUE1) in should convert string to enum without parameter()
34 fun `should convert string to enum with int parameter`() { in should convert string to enum with int parameter()
40 Truth.assertThat(converter.convert(v1)).isSameInstanceAs(EnumWithInt.VALUE1) in should convert string to enum with int parameter()
41 Truth.assertThat(converter.convert(v2)).isSameInstanceAs(EnumWithInt.VALUE2) in should convert string to enum with int parameter()
42 Truth.assertThat(converter.convert(v3)).isSameInstanceAs(EnumWithInt.VALUE3) in should convert string to enum with int parameter()
46 fun `should convert string to enum with string parameter`() { in should convert string to enum with string parameter()
52 Truth.assertThat(converter.convert(v1)).isSameInstanceAs(EnumWithString.VALUE1) in should convert string to enum with string parameter()
53 Truth.assertThat(converter.convert(v2)).isSameInstanceAs(EnumWithString.VALUE2) in should convert string to enum with string parameter()
54 Truth.assertThat(converter.convert(v3)).isSameInstanceAs(EnumWithString.VALUE3) in should convert string to enum with string parameter()
[all …]
H A DAnyTypeConverterTest.kt14 val converted = convert<Any>(dynamic) in should unwrap dynamic type()
22 val convertedDynamic = convert<Any?>(DynamicFromObject(null)) in should support nullable values()
23 val convertedValue = convert<Any?>(null) in should support nullable values()
31 convert<Any>(DynamicFromObject(null)) in should throw when null was provided to non-nullable type (Dynamic)()
36 convert<Any>(null) in should throw when null was provided to non-nullable type (Any)()
41 val convertedValue = convert<List<Any>>(listOf(1.0, "string")) in should work with collections()
42 val convertedDynamic = convert<List<Any>>( in should work with collections()
H A DPairTypeConverterTest.kt10 fun `should convert array to pair`() { in should convert array to pair()
18 val converted = convert<Pair<Int, Int>>(array) in should convert array to pair()
26 fun `should convert array with two different types to pair`() { in should convert array with two different types to pair()
34 val converted = convert<Pair<Int, String>>(array) in should convert array with two different types to pair()
/expo/packages/expo-modules-core/ios/Tests/
H A DConvertiblesSpec.swift15 let url = try URL.convert(from: remoteUrlString, appContext: appContext) in spec()
24 let url = try URL.convert(from: urlString, appContext: appContext) in spec()
38 let url = try URL.convert(from: urlString, appContext: appContext) in spec()
52 let url = try URL.convert(from: urlString, appContext: appContext) in spec()
63 let url = try URL.convert(from: urlString, appContext: appContext) in spec()
80 let url = try URL.convert(from: urlString, appContext: appContext) in spec()
98 let url = try URL.convert(from: filePath, appContext: appContext) in spec()
108 let url = try URL.convert(from: filePath, appContext: appContext) in spec()
117 let url = try URL.convert(from: filePath, appContext: appContext) in spec()
125 expect { try URL.convert(from: 29.5, appContext: appContext) }.to( in spec()
[all …]
H A DEitherSpec.swift38 let either = try Either<String, Int>.convert(from: 123, appContext: appContext) in spec()
43 …expect({ try Either<String, Int>.convert(from: true, appContext: appContext) }).to(throwError(erro… in spec()
47 let either = try Either<String, [String]>.convert(from: ["foo"], appContext: appContext) in spec()
55 let either = try Either<Int, UIColor>.convert(from: "blue", appContext: appContext) in spec()
67 … let either = try Either<String, TestRecord>.convert(from: ["foo": "bar"], appContext: appContext) in spec()
93 …expect({ try EitherOfThree<String, Int, Double>.convert(from: false, appContext: appContext) }).to… in spec()
117 …expect({ try EitherOfFour<String, Int, Double, Bool>.convert(from: [1, 2], appContext: appContext)… in spec()
/expo/ios/versioned/sdk49/ExpoModulesCore/ios/Tests/
H A DConvertiblesSpec.swift15 let url = try URL.convert(from: remoteUrlString, appContext: appContext) in spec()
24 let url = try URL.convert(from: urlString, appContext: appContext) in spec()
38 let url = try URL.convert(from: urlString, appContext: appContext) in spec()
52 let url = try URL.convert(from: urlString, appContext: appContext) in spec()
63 let url = try URL.convert(from: urlString, appContext: appContext) in spec()
80 let url = try URL.convert(from: urlString, appContext: appContext) in spec()
98 let url = try URL.convert(from: filePath, appContext: appContext) in spec()
108 let url = try URL.convert(from: filePath, appContext: appContext) in spec()
117 let url = try URL.convert(from: filePath, appContext: appContext) in spec()
125 expect { try URL.convert(from: 29.5, appContext: appContext) }.to( in spec()
[all …]
H A DEitherSpec.swift38 let either = try Either<String, Int>.convert(from: 123, appContext: appContext) in spec()
43 …expect({ try Either<String, Int>.convert(from: true, appContext: appContext) }).to(throwError(erro… in spec()
47 let either = try Either<String, [String]>.convert(from: ["foo"], appContext: appContext) in spec()
55 let either = try Either<Int, UIColor>.convert(from: "blue", appContext: appContext) in spec()
67 … let either = try Either<String, TestRecord>.convert(from: ["foo": "bar"], appContext: appContext) in spec()
93 …expect({ try EitherOfThree<String, Int, Double>.convert(from: false, appContext: appContext) }).to… in spec()
117 …expect({ try EitherOfFour<String, Int, Double, Bool>.convert(from: [1, 2], appContext: appContext)… in spec()
/expo/packages/expo-modules-core/android/src/main/cpp/types/
H A DFrontendConverter.h48 jobject convert(
63 jobject convert(
78 jobject convert(
93 jobject convert(
108 jobject convert(
123 jobject convert(
138 jobject convert(
153 jobject convert(
168 jobject convert(
183 jobject convert(
[all …]
H A DFrontendConverter.cpp27 jobject IntegerFrontendConverter::convert( in convert() function in expo::IntegerFrontendConverter
44 jobject LongFrontendConverter::convert( in convert() function in expo::LongFrontendConverter
61 jobject FloatFrontendConverter::convert( in convert() function in expo::FloatFrontendConverter
78 jobject BooleanFrontendConverter::convert( in convert() function in expo::BooleanFrontendConverter
94 jobject DoubleFrontendConverter::convert( in convert() function in expo::DoubleFrontendConverter
110 jobject StringFrontendConverter::convert( in convert() function in expo::StringFrontendConverter
156 jobject TypedArrayFrontendConverter::convert( in convert() function in expo::TypedArrayFrontendConverter
234 jobject UnknownFrontendConverter::convert( in convert() function in expo::UnknownFrontendConverter
270 jobject PolyFrontendConverter::convert( in convert() function in expo::PolyFrontendConverter
390 jobject ListFrontendConverter::convert( in convert() function in expo::ListFrontendConverter
[all …]
/expo/packages/expo-modules-core/android/src/test/java/expo/modules/kotlin/records/
H A DRecordTypeConverterTest.kt8 import expo.modules.kotlin.types.convert
13 fun `should convert map to mutable record`() { in should convert map to mutable record()
29 val myRecord = convert<MyRecord>(map) in should convert map to mutable record()
52 val myRecord = convert<MyRecord>(map) in should convert map to immutable record()
71 val myRecord = convert<MyRecord>(map) in should convert map to lateinit record()
97 val myRecord = convert<MyRecord>(map) in should convert map to mixed record()
138 val record = convert<MyRecord>(map) in should respect validators()
165 val myRecord = convert<MyRecord>(map) in should respect custom js key()
191 val myRecord = convert<MyRecord>(map) in should respect non required value()
247 val myRecord = convert<MyRecord>(map) in should work with complex types()
[all …]
/expo/ios/versioned/sdk47/ExpoModulesCore/ios/Swift/Convertibles/
H A DEither.swift53 public class func convert(from value: Any?) throws -> Self { in convert() function
85 public override class func convert(from value: Any?) throws -> Self { in convert() function
86 return value is ThirdType ? Self(value) : try super.convert(from: value) in convert()
114 public override class func convert(from value: Any?) throws -> Self { in convert() function
115 return value is FourthType ? Self(value) : try super.convert(from: value) in convert()
H A DConvertibles+Color.swift4 public static func convert(from value: Any?) throws -> Self { in convert() function
24 public static func convert(from value: Any?) throws -> Self { in convert() function
27 return try UIColor.convert(from: value).cgColor as! Self in convert()
/expo/packages/expo-modules-core/android/src/test/java/expo/modules/kotlin/functions/
H A DTypeConverterHelperTest.kt9 import expo.modules.kotlin.types.convert in <lambda>()
18 val casted = convert<Int>(dynamic) in <lambda>()
27 val casted = convert<Int?>(dynamic) in <lambda>()
40 convert(dynamic, type) in <lambda>()
68 convert(dynamic, type) in <lambda>()
84 val casted = convert<IntArray>(dynamic) in <lambda>()
100 val casted = convert<Array<Int?>>(dynamic) in <lambda>()
115 val casted = convert<Array<String?>>(dynamic) in <lambda>()
/expo/ios/versioned/sdk47/ExpoModulesCore/ios/Swift/Arguments/
H A DConvertibles.swift15 public static func convert(from value: Any?) throws -> Self { in convert() function
29 public static func convert(from value: Any?) throws -> CGPoint { in convert() function
42 public static func convert(from value: Any?) throws -> CGSize { in convert() function
55 public static func convert(from value: Any?) throws -> CGVector { in convert() function
68 public static func convert(from value: Any?) throws -> CGRect { in convert() function
/expo/ios/versioned/sdk48/ExpoModulesCore/ios/Swift/Convertibles/
H A DConvertibles+Color.swift4 public static func convert(from value: Any?) throws -> Self { in convert() function
24 public static func convert(from value: Any?) throws -> Self { in convert() function
27 return try UIColor.convert(from: value).cgColor as! Self in convert()
/expo/ios/versioned-react-native/ABI47_0_0/ReactNative/ReactCommon/react/bridging/
H A DABI47_0_0Base.h67 -> decltype(static_cast<R>(convert(rt, std::forward<T>(value)))) {
68 return convert(rt, std::forward<T>(value));
75 convert(rt, std::forward<T>(value)))) {
77 rt, convert(rt, std::forward<T>(value)));
87 convert(rt, std::forward<T>(value)),
90 rt, convert(rt, std::forward<T>(value)), jsInvoker);
98 -> decltype(convert(rt, std::forward<T>(value))) {
99 return convert(rt, std::forward<T>(value));
/expo/packages/expo-modules-core/ios/Swift/Arguments/
H A DConvertibles.swift15 public static func convert(from value: Any?, appContext: AppContext) throws -> Self { in convert() function
49 public static func convert(from value: Any?, appContext: AppContext) throws -> CGPoint { in convert() function
62 public static func convert(from value: Any?, appContext: AppContext) throws -> CGSize { in convert() function
75 public static func convert(from value: Any?, appContext: AppContext) throws -> CGVector { in convert() function
88 public static func convert(from value: Any?, appContext: AppContext) throws -> CGRect { in convert() function
/expo/ios/versioned/sdk48/ExpoModulesCore/ios/Swift/Arguments/
H A DConvertibles.swift15 public static func convert(from value: Any?) throws -> Self { in convert() function
50 public static func convert(from value: Any?) throws -> CGPoint { in convert() function
63 public static func convert(from value: Any?) throws -> CGSize { in convert() function
76 public static func convert(from value: Any?) throws -> CGVector { in convert() function
89 public static func convert(from value: Any?) throws -> CGRect { in convert() function
/expo/ios/versioned/sdk49/ExpoModulesCore/ios/Swift/Arguments/
H A DConvertibles.swift15 public static func convert(from value: Any?, appContext: AppContext) throws -> Self { in convert() function
49 public static func convert(from value: Any?, appContext: AppContext) throws -> CGPoint { in convert() function
62 public static func convert(from value: Any?, appContext: AppContext) throws -> CGSize { in convert() function
75 public static func convert(from value: Any?, appContext: AppContext) throws -> CGVector { in convert() function
88 public static func convert(from value: Any?, appContext: AppContext) throws -> CGRect { in convert() function
/expo/packages/expo-modules-core/ios/Swift/Convertibles/
H A DConvertibles+Color.swift4 public static func convert(from value: Any?, appContext: AppContext) throws -> Self { in convert() function
24 public static func convert(from value: Any?, appContext: AppContext) throws -> Self { in convert() function
27 return try UIColor.convert(from: value, appContext: appContext).cgColor as! Self in convert()
/expo/ios/versioned/sdk49/ExpoModulesCore/ios/Swift/Convertibles/
H A DConvertibles+Color.swift4 public static func convert(from value: Any?, appContext: AppContext) throws -> Self { in convert() function
24 public static func convert(from value: Any?, appContext: AppContext) throws -> Self { in convert() function
27 return try UIColor.convert(from: value, appContext: appContext).cgColor as! Self in convert()
/expo/ios/versioned-react-native/ABI48_0_0/ReactNative/Libraries/FBLazyVector/FBLazyVector/
H A DABI48_0_0FBLazyVector.h35 fromUnsafeRawValue(U v, size_type size, convert_type convert) { in fromUnsafeRawValue() argument
36 return {v, size, convert}; in fromUnsafeRawValue()
94 LazyVector(U vector, size_type size, convert_type convert) in LazyVector() argument
95 : _v(vector), _size(size), _convert(convert) {} in LazyVector()
/expo/ios/versioned-react-native/ABI47_0_0/ReactNative/Libraries/FBLazyVector/FBLazyVector/
H A DABI47_0_0FBLazyVector.h33 static LazyVector<T, U> fromUnsafeRawValue(U v, size_type size, convert_type convert) { in fromUnsafeRawValue() argument
34 return {v, size, convert}; in fromUnsafeRawValue()
91 LazyVector(U vector, size_type size, convert_type convert) in LazyVector() argument
92 : _v(vector), _size(size), _convert(convert) {} in LazyVector()
/expo/ios/versioned-react-native/ABI49_0_0/ReactNative/Libraries/FBLazyVector/FBLazyVector/
H A DABI49_0_0FBLazyVector.h35 fromUnsafeRawValue(U v, size_type size, convert_type convert) { in fromUnsafeRawValue() argument
36 return {v, size, convert}; in fromUnsafeRawValue()
94 LazyVector(U vector, size_type size, convert_type convert) in LazyVector() argument
95 : _v(vector), _size(size), _convert(convert) {} in LazyVector()
/expo/ios/versioned-react-native/ABI49_0_0/ReactNative/ReactCommon/react/bridging/
H A DABI49_0_0Base.h67 -> decltype(static_cast<R>(convert(rt, std::forward<T>(value)))) {
68 return convert(rt, std::forward<T>(value));
75 convert(rt, std::forward<T>(value)))) {
77 rt, convert(rt, std::forward<T>(value)));
87 convert(rt, std::forward<T>(value)),
90 rt, convert(rt, std::forward<T>(value)), jsInvoker);
98 return convert(rt, std::forward<T>(value));

12345678910