Skip to content

Commit c69f082

Browse files
committed
[android] Make some stdlib tests in Android follow Linux branches.
1 parent 4bca887 commit c69f082

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

test/stdlib/Runtime.swift.gyb

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -558,6 +558,14 @@ Runtime.test("SwiftError layout constants for LLDB") {
558558
let RTLD_DEFAULT = UnsafeMutableRawPointer(bitPattern: -2)
559559
#elseif os(Linux)
560560
let RTLD_DEFAULT = UnsafeMutableRawPointer(bitPattern: 0)
561+
#elseif os(Android)
562+
#if arch(arm)
563+
let RTLD_DEFAULT = UnsafeMutableRawPointer(bitPattern: 0xffffffff)
564+
#elseif arch(arm64)
565+
let RTLD_DEFAULT = UnsafeMutableRawPointer(bitPattern: 0)
566+
#else
567+
_UnimplementedError()
568+
#endif
561569
#else
562570
_UnimplementedError()
563571
#endif
@@ -574,7 +582,7 @@ Runtime.test("SwiftError layout constants for LLDB") {
574582
expectEqual(40, offsetof_SwiftError_typeMetadata.load(as: UInt.self))
575583
expectEqual(72, sizeof_SwiftError.load(as: UInt.self))
576584
#endif
577-
#elseif os(Linux)
585+
#elseif os(Linux) || os(Android)
578586
expectEqual(16, offsetof_SwiftError_typeMetadata.load(as: UInt.self))
579587
expectEqual(32, sizeof_SwiftError.load(as: UInt.self))
580588
#else

test/stdlib/mmap.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// REQUIRES: executable_test
33

44
import StdlibUnittest
5-
#if os(Linux)
5+
#if os(Linux) || os(Android)
66
import Glibc
77
#else
88
import Darwin

0 commit comments

Comments
 (0)