Skip to content

Commit

Permalink
Test fixes from the rollup
Browse files Browse the repository at this point in the history
  • Loading branch information
alexcrichton committed Apr 4, 2014
1 parent 57e0908 commit 487fa95
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 13 deletions.
10 changes: 5 additions & 5 deletions src/libstd/rt/global_heap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,16 +64,16 @@ pub unsafe fn realloc_raw(ptr: *mut u8, size: uint) -> *mut u8 {
}
}

// The compiler never calls `exchange_free` on ~ZeroSizeType, so zero-size
// allocations can point to this `static`. It would be incorrect to use a null
// pointer, due to enums assuming types like unique pointers are never null.
static EMPTY: () = ();

/// The allocator for unique pointers without contained managed pointers.
#[cfg(not(test))]
#[lang="exchange_malloc"]
#[inline]
pub unsafe fn exchange_malloc(size: uint) -> *mut u8 {
// The compiler never calls `exchange_free` on ~ZeroSizeType, so zero-size
// allocations can point to this `static`. It would be incorrect to use a null
// pointer, due to enums assuming types like unique pointers are never null.
static EMPTY: () = ();

if size == 0 {
&EMPTY as *() as *mut u8
} else {
Expand Down
16 changes: 8 additions & 8 deletions src/libsyntax/abi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -193,12 +193,12 @@ fn indices_are_correct() {

#[test]
fn pick_uniplatform() {
assert_eq!(Stdcall.for_arch(OsLinux, X86), Some(Stdcall));
assert_eq!(Stdcall.for_arch(OsLinux, Arm), None);
assert_eq!(System.for_arch(OsLinux, X86), Some(C));
assert_eq!(System.for_arch(OsWin32, X86), Some(Stdcall));
assert_eq!(System.for_arch(OsWin32, X86_64), Some(C));
assert_eq!(System.for_arch(OsWin32, Arm), Some(C));
assert_eq!(Stdcall.for_arch(OsWin32, X86), Some(Stdcall));
assert_eq!(Stdcall.for_arch(OsWin32, X86_64), Some(Stdcall));
assert_eq!(Stdcall.for_target(OsLinux, X86), Some(Stdcall));
assert_eq!(Stdcall.for_target(OsLinux, Arm), None);
assert_eq!(System.for_target(OsLinux, X86), Some(C));
assert_eq!(System.for_target(OsWin32, X86), Some(Stdcall));
assert_eq!(System.for_target(OsWin32, X86_64), Some(C));
assert_eq!(System.for_target(OsWin32, Arm), Some(C));
assert_eq!(Stdcall.for_target(OsWin32, X86), Some(Stdcall));
assert_eq!(Stdcall.for_target(OsWin32, X86_64), Some(Stdcall));
}
10 changes: 10 additions & 0 deletions src/test/bench/rt-spawn-rate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,23 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#![no_start]

extern crate green;
extern crate rustuv;

use std::task::spawn;
use std::os;
use std::uint;

// Very simple spawn rate test. Spawn N tasks that do nothing and
// return.

#[start]
fn start(argc: int, argv: **u8) -> int {
green::start(argc, argv, rustuv::event_loop, main)
}

fn main() {

let args = os::args();
Expand Down

5 comments on commit 487fa95

@bors
Copy link
Contributor

@bors bors commented on 487fa95 Apr 4, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

saw approval from alexcrichton
at alexcrichton@487fa95

@bors
Copy link
Contributor

@bors bors commented on 487fa95 Apr 4, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merging alexcrichton/rust/rollup = 487fa95 into auto

@bors
Copy link
Contributor

@bors bors commented on 487fa95 Apr 4, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

alexcrichton/rust/rollup = 487fa95 merged ok, testing candidate = e7fe207

@bors
Copy link
Contributor

@bors bors commented on 487fa95 Apr 4, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bors
Copy link
Contributor

@bors bors commented on 487fa95 Apr 4, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fast-forwarding master to auto = e7fe207

Please sign in to comment.