Skip to content

Tidy up some Android tests #24681

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Apr 29, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/test/auxiliary/cross_crate_spans.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
// except according to those terms.

#![crate_type = "rlib"]

#![allow(unused_variables)]
#![omit_gdb_pretty_printer_section]

// no-prefer-dynamic
Expand Down
5 changes: 5 additions & 0 deletions src/test/auxiliary/linkage-visibility.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@

#![feature(std_misc)]

// We're testing linkage visibility; the compiler warns us, but we want to
// do the runtime check that these functions aren't exported.
#![allow(private_no_mangle_fns)]

use std::dynamic_lib::DynamicLibrary;

#[no_mangle]
Expand All @@ -25,6 +29,7 @@ pub fn foo2<T>() {
#[no_mangle]
fn bar() { }

#[allow(dead_code)]
#[no_mangle]
fn baz() { }

Expand Down
8 changes: 3 additions & 5 deletions src/test/bench/shootout-k-nucleotide-pipes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,11 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

// ignore-android: FIXME(#10393)
// ignore-android: FIXME(#10393) hangs without output
// ignore-pretty very bad with line comments

// multi tasking k-nucleotide

#![allow(bad_style)]

use std::ascii::AsciiExt;
use std::cmp::Ordering::{self, Less, Greater, Equal};
use std::collections::HashMap;
Expand Down Expand Up @@ -47,7 +45,7 @@ fn sort_and_fmt(mm: &HashMap<Vec<u8> , usize>, total: usize) -> String {
}

// sort by key, then by value
fn sortKV(mut orig: Vec<(Vec<u8> ,f64)> ) -> Vec<(Vec<u8> ,f64)> {
fn sort_kv(mut orig: Vec<(Vec<u8> ,f64)> ) -> Vec<(Vec<u8> ,f64)> {
orig.sort_by(|&(ref a, _), &(ref b, _)| a.cmp(b));
orig.sort_by(|&(_, a), &(_, b)| f64_cmp(b, a));
orig
Expand All @@ -60,7 +58,7 @@ fn sort_and_fmt(mm: &HashMap<Vec<u8> , usize>, total: usize) -> String {
pairs.push(((*key).clone(), pct(val, total)));
}

let pairs_sorted = sortKV(pairs);
let pairs_sorted = sort_kv(pairs);

let mut buffer = String::new();
for &(ref k, v) in &pairs_sorted {
Expand Down
2 changes: 1 addition & 1 deletion src/test/bench/shootout-k-nucleotide.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
// OF THE POSSIBILITY OF SUCH DAMAGE.

// ignore-android see #10393 #13206
// ignore-android: FIXME(#10393) hangs without output

#![feature(box_syntax, std_misc, collections)]

Expand Down
4 changes: 2 additions & 2 deletions src/test/bench/shootout-reverse-complement.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
// OF THE POSSIBILITY OF SUCH DAMAGE.

// ignore-android see #10393 #13206
// ignore-android: FIXME(#10393) hangs without output

#![feature(libc, scoped)]

Expand Down Expand Up @@ -205,7 +205,7 @@ fn parallel<I: Iterator, F>(iter: I, ref f: F)

fn main() {
let mut data = Vec::with_capacity(1024 * 1024);
io::stdin().read_to_end(&mut data);
io::stdin().read_to_end(&mut data).unwrap();
let tables = &Tables::new();
parallel(mut_dna_seqs(&mut data), |seq| reverse_complement(seq, tables));
io::stdout().write_all(&data).unwrap();
Expand Down
3 changes: 1 addition & 2 deletions src/test/debuginfo/constant-debug-locs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@

// compile-flags:-g

#![allow(unused_variables)]
#![allow(dead_code)]
#![allow(dead_code, unused_variables)]
#![omit_gdb_pretty_printer_section]
#![feature(std_misc, core)]

Expand Down
3 changes: 1 addition & 2 deletions src/test/debuginfo/constant-in-match-pattern.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@

// compile-flags:-g

#![allow(unused_variables)]
#![allow(dead_code)]
#![allow(dead_code, unused_variables)]
#![omit_gdb_pretty_printer_section]

// This test makes sure that the compiler doesn't crash when trying to assign
Expand Down
4 changes: 2 additions & 2 deletions src/test/debuginfo/cross-crate-spans.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ extern crate cross_crate_spans;

// === GDB TESTS ===================================================================================

// gdb-command:break cross_crate_spans.rs:21
// gdb-command:break cross_crate_spans.rs:23
// gdb-command:run

// gdb-command:print result
Expand All @@ -44,7 +44,7 @@ extern crate cross_crate_spans;

// === LLDB TESTS ==================================================================================

// lldb-command:b cross_crate_spans.rs:21
// lldb-command:b cross_crate_spans.rs:23
// lldb-command:run

// lldb-command:print result
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@
// lldb-check:[...]$31 = 45
// lldb-command:continue

#![allow(unused_variables)]
#![allow(dead_code, unused_assignments, unused_variables)]
#![omit_gdb_pretty_printer_section]

#[no_stack_check]
Expand Down
2 changes: 2 additions & 0 deletions src/test/debuginfo/gdb-pretty-std.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@
// gdb-command: print none
// gdb-check:$6 = None

#![allow(unused_variables)]

fn main() {

// &[]
Expand Down
2 changes: 2 additions & 0 deletions src/test/debuginfo/gdb-pretty-struct-and-enums-pre-gdb-7-7.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@
// gdb-command: print c_style_enum3
// gdb-check:$5 = CStyleEnumVar3

#![allow(dead_code, unused_variables)]

struct RegularStruct {
the_first_field: isize,
the_second_field: f64,
Expand Down
2 changes: 2 additions & 0 deletions src/test/debuginfo/gdb-pretty-struct-and-enums.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@
// gdb-command: print none_check2
// gdb-check:$18 = None

#![allow(dead_code, unused_variables)]

use self::CStyleEnum::{CStyleEnumVar1, CStyleEnumVar2, CStyleEnumVar3};
use self::MixedEnum::{MixedEnumCStyleVar, MixedEnumTupleVar, MixedEnumStructVar};
use self::NestedEnum::{NestedVariant1, NestedVariant2};
Expand Down
Loading