practicalswift
fd70b26033
Fix typos in comments.
2015-12-28 02:15:34 +01:00
Brian Gesiak
6bba5f3432
[XCTest] Add more in-depth validation tests
...
The current validation tests for the stdlib XCTest only check that it
compiles, not that it works at runtime. Begin adding tests that verify
its behavior at runtime, beginning with:
- A test that Objective-C exceptions are captured and reported.
- Tests for some function overloads of `XCTAssertEqual()`.
2015-12-26 15:46:44 -05:00
Dmitri Gribenko
9d5cbc4428
Revert "Removed the ++ and -- operators"
2015-12-26 12:48:02 +01:00
David Walter
23772b1a21
Merge remote-tracking branch 'apple/master'
...
# Conflicts:
# stdlib/private/SwiftPrivate/ShardedAtomicCounter.swift
# stdlib/public/core/ArrayCast.swift
# stdlib/public/core/Collection.swift
# stdlib/public/core/ContiguousArrayBuffer.swift
# stdlib/public/core/StringBuffer.swift
# stdlib/public/core/StringUnicodeScalarView.swift
# test/1_stdlib/Builtins.swift
# test/1_stdlib/Collection.swift
# test/1_stdlib/ErrorType.swift
# test/1_stdlib/ErrorTypeBridging.swift
# test/1_stdlib/ExistentialCollection.swift
# test/1_stdlib/Float.swift
# test/1_stdlib/Map.swift
# test/1_stdlib/Mirror.swift
# test/1_stdlib/Optional.swift
# test/DebugInfo/arg-debug_value.swift
# test/DebugInfo/closure.swift
# test/DebugInfo/for.swift
# test/DebugInfo/return.swift
# test/Interpreter/availability_weak_linking.swift
# test/Interpreter/break_continue.swift
# test/SILGen/sil_locations.swift
# test/SILGen/statements.swift
# test/SILGen/unreachable_code.swift
# test/SILPasses/definite_init_diagnostics.swift
# test/SILPasses/return.swift
# test/SILPasses/switch.swift
# test/SILPasses/unreachable_code.swift
2015-12-24 13:18:29 +01:00
Dmitri Gribenko
9b15d03b73
StdlibUnittest: don't pass the name of the executable on the command line
...
Also, add a test for the command line of the child process.
2015-12-24 02:27:57 -08:00
Dmitri Gribenko
f0021929cc
Merge pull request #735 from alexwlchan/python/file-open
...
Tidy up Python file handlers
2015-12-23 11:49:08 -08:00
Dmitri Gribenko
3877d04a73
Merge pull request #731 from ken0nek/add-spaces-before-and-after-arrow
...
Add spaces before and after closure arrow
2015-12-23 10:53:22 -08:00
Max Moiseev
200be71583
Merge remote-tracking branch 'origin' into swift-3-api-guidelines
2015-12-23 10:28:04 -08:00
Alex Chan
1f2a39c5f3
Tidy up Python file handlers
...
Rather than using `f = open(path).read()`, which leaves the file open
for an indeterminate period of time, switch to the `with open(path) as f`
idiom, which ensures the file is always closed correctly.
2015-12-22 22:33:18 +00:00
ken0nek
a03824e3a9
Add spaces before and after closure arrow in validation-test/stdlib
2015-12-23 04:57:29 +09:00
Max Moiseev
a7339e67ac
Merge remote-tracking branch 'origin' into swift-3-api-guidelines
2015-12-22 11:36:07 -08:00
Max Moiseev
51865a17b2
_debugRequire => _stdlibAssert etc.
2015-12-22 10:18:36 -08:00
ken0nek
fcd8fcee91
Convert [Cc]an not -> [Cc]annot
2015-12-23 00:55:48 +09:00
Dmitri Gribenko
87bd89161d
Merge pull request #455 from frootloops/uniform-random
...
FIXME: swift/validation-test/stdlib/Set.swift:95
2015-12-21 23:36:50 -08:00
Chris Lattner
82e5c0c592
Update various tests to stop using ++/--
2015-12-21 18:07:37 -08:00
practicalswift
36d7072013
Remove immediately adjacent repeated words ("the the", "for for", "an an", etc.).
2015-12-21 22:16:04 +01:00
Max Moiseev
2f7b64e475
Merge remote-tracking branch 'origin' into swift-3-api-guidelines
2015-12-21 12:02:13 -08:00
Max Moiseev
bc942090ee
cleaning up initializePointee/deinitializePointee, error messages and comments
2015-12-18 16:22:24 -08:00
Dmitri Gribenko
06577273e9
var Sequence.enumerated => func
2015-12-18 16:22:24 -08:00
Max Moiseev
5ccc258f71
func underestimatedLength() => var underestimatedLength { get }
2015-12-18 16:22:24 -08:00
Max Moiseev
b3fcc5fefa
underestimateLength() => underestimatedLength()
2015-12-18 16:22:24 -08:00
Dmitri Gribenko
f6c00e8377
String: var lowercased, uppercased => func
2015-12-18 16:20:01 -08:00
Max Moiseev
50371821fe
reverse() => reversed()
2015-12-18 16:20:01 -08:00
Dmitri Gribenko
77376883f4
Collection.sortInPlace() => .sort()
2015-12-18 16:20:01 -08:00
Dmitri Gribenko
8f7c9ae3fd
Collection.sort() => .sorted()
2015-12-18 16:20:01 -08:00
Dmitri Gribenko
5b728dc859
Remove Range<Index> argument from Collection.partition()
...
collection.partition(i..<j) => collection[i..<j].partition()
2015-12-18 16:20:01 -08:00
Alex Chan
ce7ce98a01
Update Python build scripts to use the print function
...
In Python 3, 'print' was changed from a statement to a function. Using
the __future__ module allows scripts to use print function whether
running with Python 2.6+ or Python 3.x. This commit changes as many
instances of print as I could find to use the print function and the
__future__ module.
2015-12-18 23:00:55 +00:00
Doug Gregor
2091e7f852
Merge remote-tracking branch 'origin/swift-3-api-guidelines' into swift-3-omit-needless-words
2015-12-18 10:54:46 -08:00
Max Moiseev
f4aaece75e
revisiting CString related String extensions
2015-12-17 17:27:29 -08:00
Dmitri Gribenko
ebb3e45886
Sequence.{min,max}Element() => .min(), .max()
2015-12-17 17:07:01 -08:00
Maxim Moiseev
9e50505970
internal or public // @testable initializers
2015-12-17 17:02:49 -08:00
Dmitri Gribenko
6eedc99016
UnicodeDecodingResult: case Result(...) => case ScalarValue(...)
2015-12-17 16:31:49 -08:00
Maxim Moiseev
9d8755511d
fixing validation tests
2015-12-17 16:26:43 -08:00
Dmitri Gribenko
15a9649062
Repeated(repeating:length:) => repeatElement(_:count:)
2015-12-17 16:24:47 -08:00
Dmitri Gribenko
86f1258810
Repeat => Repeated
2015-12-17 16:24:11 -08:00
Dmitri Gribenko
73ce9ae7e9
Collection.count => .length
...
And other API changes that naturally fall out from this, like
Array(repeating:count:) => Array(repeating:length:).
2015-12-17 15:55:29 -08:00
Doug Gregor
f245f18a09
Merge remote-tracking branch 'origin/swift-3-api-guidelines' into swift-3-omit-needless-words
2015-12-17 11:35:58 -08:00
Max Moiseev
3fe0c60d7f
Merge remote-tracking branch 'origin/master' into swift-3-api-guidelines
2015-12-17 11:00:02 -08:00
Max Moiseev
a28a510407
Fixing tests
2015-12-17 10:24:40 -08:00
Maxim Moiseev
fc65e676cd
fixing validation tests
2015-12-16 17:21:57 -08:00
Maxim Moiseev
c4763ae686
_debugPrecondition => _debugRequire
2015-12-16 17:20:40 -08:00
Maxim Moiseev
e6468a0eca
_precondition => _require
2015-12-16 17:19:01 -08:00
Maxim Moiseev
f2f50d6a9d
precondition => require
2015-12-16 17:16:08 -08:00
Maxim Moiseev
6c50752aed
UnsafePointer: initializeMemory and deinitializePointee
2015-12-16 17:11:57 -08:00
Maxim Moiseev
0e54467bfa
Final bulk removal of Type suffix
2015-12-16 17:06:19 -08:00
Maxim Moiseev
ca932fca5a
CVarArgType => CVarArg
2015-12-16 15:52:01 -08:00
Dmitri Gribenko
3d0ad16094
Unsafe[Mutable]Pointer.memory => .pointee
2015-12-16 15:50:31 -08:00
Dmitri Gribenko
f1dbe205a3
UnsafeMutablePointer.dealloc(_:) => .deallocateCapacity(_:)
2015-12-16 15:47:58 -08:00
Dmitri Gribenko
1f70e25899
UnsafeMutablePointer.alloc(_:) => UnsafeMutablePointer(allocatingCapacity:)
2015-12-16 15:45:48 -08:00
Dmitri Gribenko
339c7a99dc
Remove no-argument initializers from unsafe pointer types
...
The preferred way to create a nil pointer is to use the 'nil' literal.
Affected types:
AutoreleasingUnsafeMutablePointer
OpaquePointer
UnsafeMutablePointer
UnsafePointer
2015-12-16 14:59:50 -08:00