Commit Graph

2011 Commits

Author SHA1 Message Date
Dmitri Gribenko
a5a70dd14c StdlibUnittest: use ResettableValue more, removing error-prone boilerplate from tests 2016-01-29 13:24:59 -08:00
Dmitri Gribenko
7368b08d86 Merge pull request #1133 from glessard/always-never-testpredicate
Add .Always and .Never cases to StdlibUnittest's TestPredicate
2016-01-28 23:19:55 -08:00
Guillaume Lessard
bc932451f2 Validation tests for .Never and .Always TestPredicate cases 2016-01-28 23:48:29 -07:00
Ling Wang
1ae71d4915 Merge from upstream and resolve conflicts 2016-01-28 11:13:42 -06:00
Ling Wang
148c821d2c Fix test failure 2016-01-28 09:35:00 -06:00
Austin Zheng
77918a86ac [SR-88] Reinstate Mirror migration changes, fix test issues
This reverts commit 182bb7f812.
2016-01-27 20:40:52 -08:00
Dmitri Gribenko
b4cd0e8e59 Re-enable validation-test/stdlib/XCTest.swift on OS X
The test only fails on iOS.
2016-01-27 14:09:33 -08:00
Ling Wang
29bd8cc1b5 Merge from upstream and resolve conflicts 2016-01-27 16:08:15 -06:00
Brian Gesiak
7138e08227 [validation-test][FreeBSD] xfail Foundation check
The "sorted/strings" test compares string sorting between Foundation
and ICU. Foundation is only available on OS X, so the test is expected
to fail on Linux. Foundation isn't available on FreeBSD either, so
disable it for that platform as well.
2016-01-27 16:46:48 -05:00
Andrew Trick
182bb7f812 Revert "Merge pull request #1058 from austinzheng/az-port-mirror"
This pull request broke the following tests on several build configurations
(eg --preset=buildbot,tools=RA,stdlib=DA)

    1_stdlib/Reflection.swift
    1_stdlib/ReflectionHashing.swift
    1_stdlib/UnsafePointer.swift.gyb

This reverts commit c223a3bf06, reversing
changes made to 5c2bb09b09.
2016-01-27 10:43:08 -08:00
Dmitri Gribenko
88b7d02e6a Merge pull request #1111 from glessard/string-tests-linux-dev
Make String validation tests runnable on Linux
2016-01-27 10:09:01 -08:00
Guillaume Lessard
de21de35d6 Make String validation tests runnable on Linux
Foundation-dependent tests are skipped.
2016-01-27 00:14:28 -07:00
Austin Zheng
10d5b23c30 [SR-88] Reinstate mirror migration commit
Changes:
- Reverted commit reverting original SR-88 commit
- Removed mirror children helper collections and related code
- Rewrote some tests to keep them working properly
- Wrote two more tests for the three pointer APIs to ensure no crashes if created using a value > Int64.max

This reverts commit 8917eb0e5a.
2016-01-26 19:28:32 -08:00
Dmitri Gribenko
4c590585e0 Move Default* and Minimal* colections to StdlibCollectionUnittest
New StdlibUnittest build times:

* DebugAssert compiler and library: 50s
* ReleaseAssert compiler and library: 75s
2016-01-26 18:58:04 -08:00
Dmitri Gribenko
aeeb9c1325 Move collection testing code from StdlibUnittest to a new library
This brings down StdlibUnittest build time to 90 seconds with either
a DebugAssert or a ReleaseAssert compiler.

The new library, StdlibCollectionTests, is only built when running
validation tests.
2016-01-26 18:58:03 -08:00
Matt Rajca
ea3894d524 Cleaned up IOKit overlay
- Removed unnecessary #if guard
- Used IOReturn instead of Int32 return type
- Avoided private access control for overlays
- Added a test to ensure the type of the constants matches the return type of a IOKit function
2016-01-26 20:10:21 -06:00
Dmitri Gribenko
9e3f23fc5f Regenerate the generated files after the generator script was updated 2016-01-25 17:42:41 -07:00
Matt Rajca
7e5c9d34ec Added an an overlay for IOKit that adds the kIOReturnError* constants
All of the constants and comments have been taken from IOKit/IOReturn.h: http://www.opensource.apple.com/source/xnu/xnu-792.13.8/iokit/IOKit/IOReturn.h

The type of the kIOReturn* constants is Int32 to match the type of kIOReturnSuccess (which does get imported to Swift since it isn't defined in terms of a macro).

Fixes: https://bugs.swift.org/browse/SR-576
2016-01-25 16:58:31 -06:00
practicalswift
1cd4d4e9c9 [gardening] Fix violations of non-controversial PEP8 rules
Fixes:
* multiple statements on one line (colon) (E701)
* missing whitespace around arithmetic operator (E226)
* missing whitespace around operator (E225)
* closing bracket does not match visual indentation (E124)
* blank line contains whitespace (W293)
* continuation line missing indentation or outdented (E122)
* continuation line over-indented for hanging indent (E126)
* missing expected blank line (E301)
* trailing whitespace (W291)
* unexpected spaces around keyword / parameter equals (E251)
* whitespace after '(', '[' or '{' (E201)
* whitespace before ')', ']' or '}' (E202)
* whitespace before ',' or ':' (E203)
2016-01-23 09:23:33 +01:00
Dmitri Gribenko
9bcd5a1056 Collection.length => .count 2016-01-22 18:41:19 -08:00
Dmitri Gribenko
62f73f4469 Rename CollectionDefaultIterator to IndexingIterator 2016-01-21 11:49:03 -08:00
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