|
| 1 | +import Foundation |
1 | 2 | import XCTest |
2 | 3 | import ReactiveSwift |
3 | 4 | import Result |
@@ -47,9 +48,9 @@ class ReactiveArrayTests: XCTestCase { |
47 | 48 | var array = ReactiveArray([1, 2, 3]) as Optional |
48 | 49 |
|
49 | 50 |
|
50 | | - _ = array?.signal.observeCompleted(completedExpectation.fulfill) |
| 51 | + _ = array?.signal.observeCompleted { completedExpectation.fulfill() } |
51 | 52 |
|
52 | | - _ = array?.signal.on(disposed: disposedExpectation.fulfill) |
| 53 | + _ = array?.signal.on(disposed: { disposedExpectation.fulfill() }) |
53 | 54 |
|
54 | 55 | array = nil |
55 | 56 |
|
@@ -659,6 +660,48 @@ class ReactiveArrayTests: XCTestCase { |
659 | 660 | } |
660 | 661 | } |
661 | 662 |
|
| 663 | +// MARK: - Linux support |
| 664 | + |
| 665 | +#if os(Linux) |
| 666 | +extension ReactiveArrayTests { |
| 667 | + |
| 668 | + static var allTests: [(String, (ReactiveArrayTests) -> () throws -> Void)] { |
| 669 | + return [ |
| 670 | + ("test_initializer", test_initializer), |
| 671 | + ("test_empty_initializer", test_empty_initializer), |
| 672 | + ("test_literal_initializer", test_literal_initializer), |
| 673 | + ("test_repeating_initializer", test_repeating_initializer), |
| 674 | + ("test_lifecycle", test_lifecycle), |
| 675 | + ("test_count", test_count), |
| 676 | + ("test_first", test_first), |
| 677 | + ("test_is_empty", test_is_empty), |
| 678 | + ("test_end_index", test_end_index), |
| 679 | + ("test_start_index", test_start_index), |
| 680 | + ("test_subscripting_access", test_subscripting_access), |
| 681 | + ("test_subscripting_replace_at_head", test_subscripting_replace_at_head), |
| 682 | + ("test_replace_range", test_replace_range), |
| 683 | + ("test_append", test_append), |
| 684 | + ("test_append_contents_of", test_append_contents_of), |
| 685 | + ("test_insert_at_index", test_insert_at_index), |
| 686 | + ("test_insert_contents_of", test_insert_contents_of), |
| 687 | + ("test_remove_all", test_remove_all), |
| 688 | + ("test_remove_all_and_keep_capacity", test_remove_all_and_keep_capacity), |
| 689 | + ("test_remove_first", test_remove_first), |
| 690 | + ("test_remove_first2", test_remove_first2), |
| 691 | + ("test_remove_first_all", test_remove_first_all), |
| 692 | + ("test_remove_last", test_remove_last), |
| 693 | + ("test_remove_last2", test_remove_last2), |
| 694 | + ("test_remove_last_all", test_remove_last_all), |
| 695 | + ("test_remove_at_index", test_remove_at_index), |
| 696 | + ("test_remove_subrange", test_remove_subrange), |
| 697 | + ("test_producer", test_producer), |
| 698 | + ("test_producer_with_up_to_date_changes", test_producer_with_up_to_date_changes), |
| 699 | + ("test_producer_not_retaining_array", test_producer_not_retaining_array) |
| 700 | + ] |
| 701 | + } |
| 702 | +} |
| 703 | +#endif |
| 704 | + |
662 | 705 | // MARK: - Helpers |
663 | 706 |
|
664 | 707 | func XCTAssertEqual<T>( |
|
0 commit comments