mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[embedded] Enable integer parsing in Embedded Swift
This commit is contained in:
@@ -93,7 +93,7 @@ split_embedded_sources(
|
||||
EMBEDDED Identifiable.swift
|
||||
EMBEDDED Indices.swift
|
||||
EMBEDDED InputStream.swift
|
||||
NORMAL IntegerParsing.swift
|
||||
EMBEDDED IntegerParsing.swift
|
||||
EMBEDDED Integers.swift
|
||||
NORMAL Join.swift
|
||||
EMBEDDED KeyPath.swift
|
||||
|
||||
19
test/embedded/stdlib-parsing.swift
Normal file
19
test/embedded/stdlib-parsing.swift
Normal file
@@ -0,0 +1,19 @@
|
||||
// RUN: %target-run-simple-swift(-Osize -swift-version 5 -enable-experimental-feature Embedded -parse-as-library -runtime-compatibility-version none -wmo) | %FileCheck %s
|
||||
|
||||
// REQUIRES: swift_in_compiler
|
||||
// REQUIRES: executable_test
|
||||
// REQUIRES: optimized_stdlib
|
||||
// REQUIRES: OS=macosx || OS=linux-gnu
|
||||
// REQUIRES: swift_feature_Embedded
|
||||
|
||||
@main
|
||||
struct Main {
|
||||
static func main() {
|
||||
print(Int("42")!)
|
||||
// CHECK: 42
|
||||
print(Int("-123")!)
|
||||
// CHECK: -123
|
||||
print(Int("1000", radix: 16)!)
|
||||
// CHECK: 4096
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user