Skip to content

Commit 3dcdcce

Browse files
committed
---
yaml --- r: 91639 b: refs/heads/auto c: a46b2b8 h: refs/heads/master i: 91637: 28f2101 91635: 8a87ec9 91631: 26ff522 v: v3
1 parent 374d380 commit 3dcdcce

File tree

75 files changed

+185
-172
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

75 files changed

+185
-172
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0
1313
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
1414
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1515
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
16-
refs/heads/auto: 4059b5c4b3b8a57a645982b0770d25f0283dfb06
16+
refs/heads/auto: a46b2b8e7aafd23a4d3850d4de6653e363fd0813
1717
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167
1818
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c
1919
refs/tags/0.1: b19db808c2793fe2976759b85a355c3ad8c8b336

branches/auto/src/librustuv/addrinfo.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,6 @@ mod test {
191191
use super::super::local_loop;
192192

193193
#[test]
194-
#[ignore(cfg(target_os="android"))] // cannot give tcp/ip permission without help of apk
195194
fn getaddrinfo_test() {
196195
match GetAddrInfoRequest::run(local_loop(), Some("localhost"), None, None) {
197196
Ok(infos) => {

branches/auto/src/librustuv/pipe.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,7 @@ mod tests {
251251
use super::super::local_loop;
252252

253253
#[test]
254+
#[ignore(cfg(windows))] // FIXME(#10386): how windows pipes work
254255
fn connect_err() {
255256
match PipeWatcher::connect(local_loop(), &"path/to/nowhere".to_c_str()) {
256257
Ok(*) => fail!(),
@@ -259,6 +260,7 @@ mod tests {
259260
}
260261

261262
#[test]
263+
#[ignore(cfg(windows))] // FIXME(#10386): how windows pipes work
262264
fn bind_err() {
263265
match PipeListener::bind(local_loop(), &"path/to/nowhere".to_c_str()) {
264266
Ok(*) => fail!(),
@@ -267,6 +269,7 @@ mod tests {
267269
}
268270

269271
#[test]
272+
#[ignore(cfg(windows))] // FIXME(#10386): how windows pipes work
270273
fn bind() {
271274
let p = next_test_unix().to_c_str();
272275
match PipeListener::bind(local_loop(), &p) {
@@ -276,13 +279,15 @@ mod tests {
276279
}
277280

278281
#[test] #[should_fail]
282+
#[ignore(cfg(windows))] // FIXME(#10386): how windows pipes work
279283
fn bind_fail() {
280284
let p = next_test_unix().to_c_str();
281285
let _w = PipeListener::bind(local_loop(), &p).unwrap();
282286
fail!();
283287
}
284288

285289
#[test]
290+
#[ignore(cfg(windows))] // FIXME(#10386): how windows pipes work
286291
fn connect() {
287292
let path = next_test_unix();
288293
let path2 = path.clone();
@@ -308,6 +313,7 @@ mod tests {
308313
}
309314

310315
#[test] #[should_fail]
316+
#[ignore(cfg(windows))] // FIXME(#10386): how windows pipes work
311317
fn connect_fail() {
312318
let path = next_test_unix();
313319
let path2 = path.clone();

branches/auto/src/libstd/iter.rs

Lines changed: 8 additions & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ the rest of the rust manuals.
6565
*/
6666

6767
use cmp;
68-
use num::{Zero, One, Integer, CheckedAdd, CheckedSub, Saturating, ToPrimitive};
68+
use num::{Zero, One, Integer, CheckedAdd, CheckedSub, Saturating};
6969
use option::{Option, Some, None};
7070
use ops::{Add, Mul, Sub};
7171
use cmp::{Eq, Ord};
@@ -1829,8 +1829,7 @@ pub fn range<A: Add<A, A> + Ord + Clone + One>(start: A, stop: A) -> Range<A> {
18291829
Range{state: start, stop: stop, one: One::one()}
18301830
}
18311831

1832-
// FIXME: #10414: Unfortunate type bound
1833-
impl<A: Add<A, A> + Ord + Clone + ToPrimitive> Iterator<A> for Range<A> {
1832+
impl<A: Add<A, A> + Ord + Clone> Iterator<A> for Range<A> {
18341833
#[inline]
18351834
fn next(&mut self) -> Option<A> {
18361835
if self.state < self.stop {
@@ -1842,42 +1841,13 @@ impl<A: Add<A, A> + Ord + Clone + ToPrimitive> Iterator<A> for Range<A> {
18421841
}
18431842
}
18441843

1845-
#[inline]
1846-
fn size_hint(&self) -> (uint, Option<uint>) {
1847-
// This first checks if the elements are representable as i64. If they aren't, try u64 (to
1848-
// handle cases like range(huge, huger)). We don't use uint/int because the difference of
1849-
// the i64/u64 might lie within their range.
1850-
let bound = match self.state.to_i64() {
1851-
Some(a) => {
1852-
let sz = self.stop.to_i64().map(|b| b.checked_sub(&a));
1853-
match sz {
1854-
Some(Some(bound)) => bound.to_uint(),
1855-
_ => None,
1856-
}
1857-
},
1858-
None => match self.state.to_u64() {
1859-
Some(a) => {
1860-
let sz = self.stop.to_u64().map(|b| b.checked_sub(&a));
1861-
match sz {
1862-
Some(Some(bound)) => bound.to_uint(),
1863-
_ => None
1864-
}
1865-
},
1866-
None => None
1867-
}
1868-
};
1869-
1870-
match bound {
1871-
Some(b) => (b, Some(b)),
1872-
// Standard fallback for unbounded/unrepresentable bounds
1873-
None => (0, None)
1874-
}
1875-
}
1844+
// FIXME: #8606 Implement size_hint() on Range
1845+
// Blocked on #8605 Need numeric trait for converting to `Option<uint>`
18761846
}
18771847

18781848
/// `Integer` is required to ensure the range will be the same regardless of
18791849
/// the direction it is consumed.
1880-
impl<A: Integer + Ord + Clone + ToPrimitive> DoubleEndedIterator<A> for Range<A> {
1850+
impl<A: Integer + Ord + Clone> DoubleEndedIterator<A> for Range<A> {
18811851
#[inline]
18821852
fn next_back(&mut self) -> Option<A> {
18831853
if self.stop > self.state {
@@ -1898,12 +1868,11 @@ pub struct RangeInclusive<A> {
18981868

18991869
/// Return an iterator over the range [start, stop]
19001870
#[inline]
1901-
pub fn range_inclusive<A: Add<A, A> + Ord + Clone + One + ToPrimitive>(start: A, stop: A)
1902-
-> RangeInclusive<A> {
1871+
pub fn range_inclusive<A: Add<A, A> + Ord + Clone + One>(start: A, stop: A) -> RangeInclusive<A> {
19031872
RangeInclusive{range: range(start, stop), done: false}
19041873
}
19051874

1906-
impl<A: Add<A, A> + Eq + Ord + Clone + ToPrimitive> Iterator<A> for RangeInclusive<A> {
1875+
impl<A: Add<A, A> + Eq + Ord + Clone> Iterator<A> for RangeInclusive<A> {
19071876
#[inline]
19081877
fn next(&mut self) -> Option<A> {
19091878
match self.range.next() {
@@ -1935,8 +1904,7 @@ impl<A: Add<A, A> + Eq + Ord + Clone + ToPrimitive> Iterator<A> for RangeInclusi
19351904
}
19361905
}
19371906

1938-
impl<A: Sub<A, A> + Integer + Ord + Clone + ToPrimitive> DoubleEndedIterator<A>
1939-
for RangeInclusive<A> {
1907+
impl<A: Sub<A, A> + Integer + Ord + Clone> DoubleEndedIterator<A> for RangeInclusive<A> {
19401908
#[inline]
19411909
fn next_back(&mut self) -> Option<A> {
19421910
if self.range.stop > self.range.state {
@@ -2216,7 +2184,6 @@ mod tests {
22162184

22172185
use cmp;
22182186
use uint;
2219-
use num;
22202187

22212188
#[test]
22222189
fn test_counter_from_iter() {
@@ -2834,51 +2801,12 @@ mod tests {
28342801

28352802
#[test]
28362803
fn test_range() {
2837-
/// A mock type to check Range when ToPrimitive returns None
2838-
struct Foo;
2839-
2840-
impl ToPrimitive for Foo {
2841-
fn to_i64(&self) -> Option<i64> { None }
2842-
fn to_u64(&self) -> Option<u64> { None }
2843-
}
2844-
2845-
impl Add<Foo, Foo> for Foo {
2846-
fn add(&self, _: &Foo) -> Foo {
2847-
Foo
2848-
}
2849-
}
2850-
2851-
impl Ord for Foo {
2852-
fn lt(&self, _: &Foo) -> bool {
2853-
false
2854-
}
2855-
}
2856-
2857-
impl Clone for Foo {
2858-
fn clone(&self) -> Foo {
2859-
Foo
2860-
}
2861-
}
2862-
2863-
impl num::One for Foo {
2864-
fn one() -> Foo {
2865-
Foo
2866-
}
2867-
}
2868-
28692804
assert_eq!(range(0i, 5).collect::<~[int]>(), ~[0i, 1, 2, 3, 4]);
2870-
assert_eq!(range(-10i, -1).collect::<~[int]>(), ~[-10, -9, -8, -7, -6, -5, -4, -3, -2]);
28712805
assert_eq!(range(0i, 5).invert().collect::<~[int]>(), ~[4, 3, 2, 1, 0]);
28722806
assert_eq!(range(200, -5).collect::<~[int]>(), ~[]);
28732807
assert_eq!(range(200, -5).invert().collect::<~[int]>(), ~[]);
28742808
assert_eq!(range(200, 200).collect::<~[int]>(), ~[]);
28752809
assert_eq!(range(200, 200).invert().collect::<~[int]>(), ~[]);
2876-
2877-
assert_eq!(range(0i, 100).size_hint(), (100, Some(100)));
2878-
// this test is only meaningful when sizeof uint < sizeof u64
2879-
assert_eq!(range(uint::max_value - 1, uint::max_value).size_hint(), (1, Some(1)));
2880-
assert_eq!(range(-10i, -1).size_hint(), (9, Some(9)));
2881-
assert_eq!(range(Foo, Foo).size_hint(), (0, None));
28822810
}
28832811

28842812
#[test]

branches/auto/src/libstd/rt/io/net/addrinfo.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,6 @@ mod test {
114114
use super::*;
115115

116116
#[test]
117-
#[ignore(cfg(target_os="android"))] // cannot give tcp/ip permission without help of apk
118117
fn dns_smoke_test() {
119118
let ipaddrs = get_host_addresses("localhost").unwrap();
120119
let mut found_local = false;

branches/auto/src/libstd/rt/io/signal.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ mod test {
161161
}
162162
}
163163

164-
#[test] #[cfg(unix, not(target_os="android"))] // FIXME(#10378)
164+
#[test] #[cfg(unix)]
165165
fn test_io_signal_smoketest() {
166166
let mut signal = Listener::new();
167167
signal.register(Interrupt);
@@ -173,7 +173,7 @@ mod test {
173173
}
174174
}
175175

176-
#[test] #[cfg(unix, not(target_os="android"))] // FIXME(#10378)
176+
#[test] #[cfg(unix)]
177177
fn test_io_signal_two_signal_one_signum() {
178178
let mut s1 = Listener::new();
179179
let mut s2 = Listener::new();
@@ -191,7 +191,7 @@ mod test {
191191
}
192192
}
193193

194-
#[test] #[cfg(unix, not(target_os="android"))] // FIXME(#10378)
194+
#[test] #[cfg(unix)]
195195
fn test_io_signal_unregister() {
196196
let mut s1 = Listener::new();
197197
let mut s2 = Listener::new();

branches/auto/src/libstd/rt/io/timer.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,8 @@ mod test {
111111
use prelude::*;
112112
use super::*;
113113
use rt::test::*;
114+
use cell::Cell;
115+
use task;
114116

115117
#[test]
116118
fn test_io_timer_sleep_simple() {

branches/auto/src/libstd/rt/test.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -375,11 +375,7 @@ pub fn next_test_port() -> u16 {
375375
/// Get a temporary path which could be the location of a unix socket
376376
#[fixed_stack_segment] #[inline(never)]
377377
pub fn next_test_unix() -> Path {
378-
if cfg!(unix) {
379-
os::tmpdir().join(rand::task_rng().gen_ascii_str(20))
380-
} else {
381-
Path::new(r"\\.\pipe\" + rand::task_rng().gen_ascii_str(20))
382-
}
378+
os::tmpdir().join(rand::task_rng().gen_ascii_str(20))
383379
}
384380

385381
/// Get a unique IPv4 localhost:port pair starting at 9600

0 commit comments

Comments
 (0)