Commit Graph

640 Commits

Author SHA1 Message Date
Erik Eckstein
adef0368bb tests: add import statements to workaround linker errors in all relevant tests.
This is needed if we compile StdlibUnittest with -sil-serialize-all
So far I added the imports only in files which needed them. But this may change, depending on the optimizer (inlining).
Adding them in all files doesn't harm and avoids confusion if someone makes an unrelated change which would result in such a linker error.
2016-01-21 09:59:50 -08:00
Slava Pestov
f099da66b8 Add dummy Optional declaration to MicroStdlib.swift test
This broke when we switched on materializeForSet emission for all
stored properties of structs.
2016-01-20 14:51:44 -08:00
Max Moiseev
9a018bd77d Merge remote-tracking branch 'origin/master' into swift-3-api-guidelines 2016-01-20 14:38:22 -08:00
Chris Lattner
0632a65736 Merge pull request #1024 from glessard/details1
silence some warnings in validation-test/stdlib/String.swift
2016-01-20 09:19:41 -08:00
Guillaume Lessard
d6571c645b Replace ++ by "+= 1" 2016-01-20 07:45:54 -07:00
Guillaume Lessard
0f46bd465d Unmutated vars changed to lets 2016-01-20 07:45:54 -07:00
Doug Gregor
7d70b704e4 Merge commit '5e11e3f7287427d386636a169c4065c0373931a8' into swift-3-api-guidelines 2016-01-19 23:18:20 -08:00
Erik Eckstein
beff34c1b6 test: Temporarily disable the XCTest because it fails to load a dylib.
rdar://problem/24222804
2016-01-17 09:48:09 -08:00
Dmitri Gribenko
de7e2e721d Merge pull request #785 from modocache/xctest-validation-tests
[XCTest] Add more in-depth validation tests
2016-01-15 18:40:19 -08:00
Dmitri Gribenko
5a1f8b25a5 Merge pull request #979 from antonblanchard/powerpc64_merge
Add powerpc64le Linux support
2016-01-15 18:14:45 -08:00
practicalswift
22d043fcc0 [gardening] Fix violations of non-controversial PEP8 rules.
Fixes:
* blank line at end of file
* closing bracket does not match indentation of opening bracket's line
* continuation line over-indented for hanging indent
* continuation line over-indented for visual indent
* continuation line unaligned for hanging indent
* inline comment should start with '# '
* missing whitespace around arithmetic operator
* missing whitespace around bitwise or shift operator
* multiple imports on one line
* multiple spaces after ':'
* multiple spaces after operator
2016-01-16 00:47:43 +01:00
Anton Blanchard
b1827d8a8f Add powerpc64le Linux support
This patch adds powerpc64le Linux support. While the patch also adds
the matching powerpc64 bits, there are endian issues that need to be
sorted out.

The PowerPC LLVM changes for the swift ABI (eg returning three element
non-homogeneous aggregates) are still in the works, but a simple LLVM
fix to allow those aggregates results in swift passing all but 8
test cases.
2016-01-15 06:48:31 +00:00
Emanuel Zephir
f87ec8c071 [StdLib] Update requirements for UnicodeUTFEncoders test
All of the tests in this file need the Objective-C runtime. This change removes
the XFAIL on linux and replaces it with a runtime requirement.
2016-01-14 11:22:26 -08:00
Maxim Moiseev
e8886a4ffa Merge pull request #920 from practicalswift/gyb-fixes
[gardening] Clean up .gyb-files: Remove unused imports. Non-controversial PEP8 fixes.
2016-01-12 09:27:48 -08:00
Max Moiseev
08e1e4a043 Merge remote-tracking branch 'origin/master' into swift-3-api-guidelines 2016-01-11 16:51:11 -08:00
Greg Parker
c9f4dc0044 [test] Fail if a test file uses StdlibUnittest but runs no tests.
This catches accidental omission of runAllTests(). Previously
such test files would silently test nothing and succeed.
2016-01-09 03:27:56 -08:00
Greg Parker
1e5ae166e5 [test] Camouflage "XFAIL:" output checks so lit doesn't interpret them. 2016-01-09 03:27:56 -08:00
practicalswift
57d4f2d4da Remove redundant backslashes. 2016-01-09 01:39:22 +01:00
practicalswift
bf90a10adc Avoid multiple imports on same line. 2016-01-09 01:39:22 +01:00
practicalswift
21c3d93bea Remove unused imports. 2016-01-09 01:39:22 +01:00
Erik Eckstein
9c25ce1a75 tests: add a few more import statements to workaround linker errors 2016-01-08 15:08:56 -08:00
Davide Italiano
f1b3965586 [stdlib] Port StdlibUnittest to FreeBSD. 2016-01-07 21:05:32 +00:00
Max Moiseev
f51e708a8f Merge remote-tracking branch 'origin/master' into swift-3-api-guidelines 2016-01-04 12:25:25 -08:00
practicalswift
50baf2e53b Use consistent formatting in top of file headers. 2016-01-04 02:17:48 +01:00
Ling Wang
bb7119f4ae Add O(1) contains() implementation for Range with Comparable Element 2016-01-01 19:43:01 -06:00
Zach Panzarino
e3a4147ac9 Update copyright date 2015-12-31 23:28:40 +00:00
practicalswift
149b50d901 Fix typos in code (non-comment/documentation typos). 2015-12-28 11:42:15 +01:00
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