Some basic acceptance tests for better SVH.
This commit is contained in:
parent
b9ed9ed5ad
commit
a92d162026
37
src/test/auxiliary/svh-a-base.rs
Normal file
37
src/test/auxiliary/svh-a-base.rs
Normal file
@ -0,0 +1,37 @@
|
||||
// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
|
||||
// file at the top-level directory of this distribution and at
|
||||
// http://rust-lang.org/COPYRIGHT.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
||||
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
||||
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
//! The `svh-a-*.rs` files are all deviations from the base file
|
||||
//! svh-a-base.rs with some difference (usually in `fn foo`) that
|
||||
//! should not affect the strict version hash (SVH) computation
|
||||
//! (#14132).
|
||||
|
||||
#![feature(macro_rules)]
|
||||
|
||||
#![crate_id = "a"]
|
||||
|
||||
macro_rules! three {
|
||||
() => { 3 }
|
||||
}
|
||||
|
||||
pub trait U {}
|
||||
pub trait V {}
|
||||
impl U for () {}
|
||||
impl V for () {}
|
||||
|
||||
static A_CONSTANT : int = 2;
|
||||
|
||||
pub fn foo<T:U>(_: int) -> int {
|
||||
3
|
||||
}
|
||||
|
||||
pub fn an_unused_name() -> int {
|
||||
4
|
||||
}
|
37
src/test/auxiliary/svh-a-change-lit.rs
Normal file
37
src/test/auxiliary/svh-a-change-lit.rs
Normal file
@ -0,0 +1,37 @@
|
||||
// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
|
||||
// file at the top-level directory of this distribution and at
|
||||
// http://rust-lang.org/COPYRIGHT.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
||||
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
||||
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
//! The `svh-a-*.rs` files are all deviations from the base file
|
||||
//! svh-a-base.rs with some difference (usually in `fn foo`) that
|
||||
//! should not affect the strict version hash (SVH) computation
|
||||
//! (#14132).
|
||||
|
||||
#![feature(macro_rules)]
|
||||
|
||||
#![crate_id = "a"]
|
||||
|
||||
macro_rules! three {
|
||||
() => { 3 }
|
||||
}
|
||||
|
||||
pub trait U {}
|
||||
pub trait V {}
|
||||
impl U for () {}
|
||||
impl V for () {}
|
||||
|
||||
static A_CONSTANT : int = 2;
|
||||
|
||||
pub fn foo<T:U>(_: int) -> int {
|
||||
0
|
||||
}
|
||||
|
||||
pub fn an_unused_name() -> int {
|
||||
4
|
||||
}
|
39
src/test/auxiliary/svh-a-change-significant-cfg.rs
Normal file
39
src/test/auxiliary/svh-a-change-significant-cfg.rs
Normal file
@ -0,0 +1,39 @@
|
||||
// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
|
||||
// file at the top-level directory of this distribution and at
|
||||
// http://rust-lang.org/COPYRIGHT.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
||||
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
||||
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
//! The `svh-a-*.rs` files are all deviations from the base file
|
||||
//! svh-a-base.rs with some difference (usually in `fn foo`) that
|
||||
//! should not affect the strict version hash (SVH) computation
|
||||
//! (#14132).
|
||||
|
||||
#![feature(macro_rules)]
|
||||
|
||||
#![crate_id = "a"]
|
||||
|
||||
macro_rules! three {
|
||||
() => { 3 }
|
||||
}
|
||||
|
||||
pub trait U {}
|
||||
pub trait V {}
|
||||
impl U for () {}
|
||||
impl V for () {}
|
||||
|
||||
static A_CONSTANT : int = 2;
|
||||
|
||||
#[cfg(some_flag)]
|
||||
pub fn foo<T:U>(_: int) -> int {
|
||||
3
|
||||
}
|
||||
|
||||
#[cfg(not(some_flag))]
|
||||
pub fn an_unused_name() -> int {
|
||||
4
|
||||
}
|
37
src/test/auxiliary/svh-a-change-trait-bound.rs
Normal file
37
src/test/auxiliary/svh-a-change-trait-bound.rs
Normal file
@ -0,0 +1,37 @@
|
||||
// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
|
||||
// file at the top-level directory of this distribution and at
|
||||
// http://rust-lang.org/COPYRIGHT.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
||||
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
||||
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
//! The `svh-a-*.rs` files are all deviations from the base file
|
||||
//! svh-a-base.rs with some difference (usually in `fn foo`) that
|
||||
//! should not affect the strict version hash (SVH) computation
|
||||
//! (#14132).
|
||||
|
||||
#![feature(macro_rules)]
|
||||
|
||||
#![crate_id = "a"]
|
||||
|
||||
macro_rules! three {
|
||||
() => { 3 }
|
||||
}
|
||||
|
||||
pub trait U {}
|
||||
pub trait V {}
|
||||
impl U for () {}
|
||||
impl V for () {}
|
||||
|
||||
static A_CONSTANT : int = 2;
|
||||
|
||||
pub fn foo<T:V>(_: int) -> int {
|
||||
3
|
||||
}
|
||||
|
||||
pub fn an_unused_name() -> int {
|
||||
4
|
||||
}
|
38
src/test/auxiliary/svh-a-comment.rs
Normal file
38
src/test/auxiliary/svh-a-comment.rs
Normal file
@ -0,0 +1,38 @@
|
||||
// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
|
||||
// file at the top-level directory of this distribution and at
|
||||
// http://rust-lang.org/COPYRIGHT.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
||||
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
||||
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
//! The `svh-a-*.rs` files are all deviations from the base file
|
||||
//! svh-a-base.rs with some difference (usually in `fn foo`) that
|
||||
//! should not affect the strict version hash (SVH) computation
|
||||
//! (#14132).
|
||||
|
||||
#![feature(macro_rules)]
|
||||
|
||||
#![crate_id = "a"]
|
||||
|
||||
macro_rules! three {
|
||||
() => { 3 }
|
||||
}
|
||||
|
||||
pub trait U {}
|
||||
pub trait V {}
|
||||
impl U for () {}
|
||||
impl V for () {}
|
||||
|
||||
static A_CONSTANT : int = 2;
|
||||
|
||||
pub fn foo<T:U>(_: int) -> int {
|
||||
// a comment does not affect the svh
|
||||
3
|
||||
}
|
||||
|
||||
pub fn an_unused_name() -> int {
|
||||
4
|
||||
}
|
40
src/test/auxiliary/svh-a-doc.rs
Normal file
40
src/test/auxiliary/svh-a-doc.rs
Normal file
@ -0,0 +1,40 @@
|
||||
// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
|
||||
// file at the top-level directory of this distribution and at
|
||||
// http://rust-lang.org/COPYRIGHT.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
||||
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
||||
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
//! The `svh-a-*.rs` files are all deviations from the base file
|
||||
//! svh-a-base.rs with some difference (usually in `fn foo`) that
|
||||
//! should not affect the strict version hash (SVH) computation
|
||||
//! (#14132).
|
||||
|
||||
#![feature(macro_rules)]
|
||||
|
||||
#![crate_id = "a"]
|
||||
|
||||
macro_rules! three {
|
||||
() => { 3 }
|
||||
}
|
||||
|
||||
pub trait U {}
|
||||
pub trait V {}
|
||||
impl U for () {}
|
||||
impl V for () {}
|
||||
|
||||
static A_CONSTANT : int = 2;
|
||||
|
||||
// Adding some documentation does not affect the svh.
|
||||
|
||||
/// foo always returns three.
|
||||
pub fn foo<T:U>(_: int) -> int {
|
||||
3
|
||||
}
|
||||
|
||||
pub fn an_unused_name() -> int {
|
||||
4
|
||||
}
|
39
src/test/auxiliary/svh-a-macro.rs
Normal file
39
src/test/auxiliary/svh-a-macro.rs
Normal file
@ -0,0 +1,39 @@
|
||||
// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
|
||||
// file at the top-level directory of this distribution and at
|
||||
// http://rust-lang.org/COPYRIGHT.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
||||
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
||||
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
//! The `svh-a-*.rs` files are all deviations from the base file
|
||||
//! svh-a-base.rs with some difference (usually in `fn foo`) that
|
||||
//! should not affect the strict version hash (SVH) computation
|
||||
//! (#14132).
|
||||
|
||||
#![feature(macro_rules)]
|
||||
|
||||
#![crate_id = "a"]
|
||||
|
||||
macro_rules! three {
|
||||
() => { 3 }
|
||||
}
|
||||
|
||||
pub trait U {}
|
||||
pub trait V {}
|
||||
impl U for () {}
|
||||
impl V for () {}
|
||||
|
||||
static A_CONSTANT : int = 2;
|
||||
|
||||
pub fn foo<T:U>(_: int) -> int {
|
||||
// a macro invocation in a function body does not affect the svh,
|
||||
// as long as it yields the same code.
|
||||
three!()
|
||||
}
|
||||
|
||||
pub fn an_unused_name() -> int {
|
||||
4
|
||||
}
|
37
src/test/auxiliary/svh-a-no-change.rs
Normal file
37
src/test/auxiliary/svh-a-no-change.rs
Normal file
@ -0,0 +1,37 @@
|
||||
// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
|
||||
// file at the top-level directory of this distribution and at
|
||||
// http://rust-lang.org/COPYRIGHT.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
||||
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
||||
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
//! The `svh-a-*.rs` files are all deviations from the base file
|
||||
//! svh-a-base.rs with some difference (usually in `fn foo`) that
|
||||
//! should not affect the strict version hash (SVH) computation
|
||||
//! (#14132).
|
||||
|
||||
#![feature(macro_rules)]
|
||||
|
||||
#![crate_id = "a"]
|
||||
|
||||
macro_rules! three {
|
||||
() => { 3 }
|
||||
}
|
||||
|
||||
pub trait U {}
|
||||
pub trait V {}
|
||||
impl U for () {}
|
||||
impl V for () {}
|
||||
|
||||
static A_CONSTANT : int = 2;
|
||||
|
||||
pub fn foo<T:U>(_: int) -> int {
|
||||
3
|
||||
}
|
||||
|
||||
pub fn an_unused_name() -> int {
|
||||
4
|
||||
}
|
39
src/test/auxiliary/svh-a-redundant-cfg.rs
Normal file
39
src/test/auxiliary/svh-a-redundant-cfg.rs
Normal file
@ -0,0 +1,39 @@
|
||||
// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
|
||||
// file at the top-level directory of this distribution and at
|
||||
// http://rust-lang.org/COPYRIGHT.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
||||
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
||||
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
//! The `svh-a-*.rs` files are all deviations from the base file
|
||||
//! svh-a-base.rs with some difference (usually in `fn foo`) that
|
||||
//! should not affect the strict version hash (SVH) computation
|
||||
//! (#14132).
|
||||
|
||||
#![feature(macro_rules)]
|
||||
|
||||
#![crate_id = "a"]
|
||||
|
||||
macro_rules! three {
|
||||
() => { 3 }
|
||||
}
|
||||
|
||||
pub trait U {}
|
||||
pub trait V {}
|
||||
impl U for () {}
|
||||
impl V for () {}
|
||||
|
||||
static A_CONSTANT : int = 2;
|
||||
|
||||
// cfg attribute does not affect the svh, as long as it yields the same code.
|
||||
#[cfg(not(an_unused_name))]
|
||||
pub fn foo<T:U>(_: int) -> int {
|
||||
3
|
||||
}
|
||||
|
||||
pub fn an_unused_name() -> int {
|
||||
4
|
||||
}
|
39
src/test/auxiliary/svh-a-whitespace.rs
Normal file
39
src/test/auxiliary/svh-a-whitespace.rs
Normal file
@ -0,0 +1,39 @@
|
||||
// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
|
||||
// file at the top-level directory of this distribution and at
|
||||
// http://rust-lang.org/COPYRIGHT.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
||||
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
||||
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
//! The `svh-a-*.rs` files are all deviations from the base file
|
||||
//! svh-a-base.rs with some difference (usually in `fn foo`) that
|
||||
//! should not affect the strict version hash (SVH) computation
|
||||
//! (#14132).
|
||||
|
||||
#![feature(macro_rules)]
|
||||
|
||||
#![crate_id = "a"]
|
||||
|
||||
macro_rules! three {
|
||||
() => { 3 }
|
||||
}
|
||||
|
||||
pub trait U {}
|
||||
pub trait V {}
|
||||
impl U for () {}
|
||||
impl V for () {}
|
||||
|
||||
static A_CONSTANT : int = 2;
|
||||
|
||||
pub fn foo<T:U>(_: int) -> int {
|
||||
|
||||
3
|
||||
|
||||
}
|
||||
|
||||
pub fn an_unused_name() -> int {
|
||||
4
|
||||
}
|
23
src/test/auxiliary/svh-b.rs
Normal file
23
src/test/auxiliary/svh-b.rs
Normal file
@ -0,0 +1,23 @@
|
||||
// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
|
||||
// file at the top-level directory of this distribution and at
|
||||
// http://rust-lang.org/COPYRIGHT.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
||||
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
||||
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
//! This is a client of the `a` crate defined in "svn-a-base.rs". The
|
||||
//! rpass and cfail tests (such as "run-pass/svh-add-comment.rs") use
|
||||
//! it by swapping in a different object code library crate built from
|
||||
//! some variant of "svn-a-base.rs", and then we are checking if the
|
||||
//! compiler properly ignores or accepts the change, based on whether
|
||||
//! the change could affect the downstream crate content or not
|
||||
//! (#14132).
|
||||
|
||||
#![crate_id = "b"]
|
||||
|
||||
extern crate a;
|
||||
|
||||
pub fn foo() { assert_eq!(a::foo::<()>(0), 3); }
|
24
src/test/compile-fail/svh-change-lit.rs
Normal file
24
src/test/compile-fail/svh-change-lit.rs
Normal file
@ -0,0 +1,24 @@
|
||||
// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
|
||||
// file at the top-level directory of this distribution and at
|
||||
// http://rust-lang.org/COPYRIGHT.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
||||
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
||||
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// note that these aux-build directives must be in this order
|
||||
// aux-build:svh-a-base.rs
|
||||
// aux-build:svh-b.rs
|
||||
// aux-build:svh-a-change-lit.rs
|
||||
|
||||
#![feature(macro_rules)]
|
||||
|
||||
extern crate a;
|
||||
extern crate b; //~ ERROR: found possibly newer version of crate `a` which `b` depends on
|
||||
//~^ NOTE: perhaps this crate needs to be recompiled
|
||||
|
||||
fn main() {
|
||||
b::foo()
|
||||
}
|
24
src/test/compile-fail/svh-change-significant-cfg.rs
Normal file
24
src/test/compile-fail/svh-change-significant-cfg.rs
Normal file
@ -0,0 +1,24 @@
|
||||
// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
|
||||
// file at the top-level directory of this distribution and at
|
||||
// http://rust-lang.org/COPYRIGHT.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
||||
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
||||
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// note that these aux-build directives must be in this order
|
||||
// aux-build:svh-a-base.rs
|
||||
// aux-build:svh-b.rs
|
||||
// aux-build:svh-a-change-significant-cfg.rs
|
||||
|
||||
#![feature(macro_rules)]
|
||||
|
||||
extern crate a;
|
||||
extern crate b; //~ ERROR: found possibly newer version of crate `a` which `b` depends on
|
||||
//~^ NOTE: perhaps this crate needs to be recompiled
|
||||
|
||||
fn main() {
|
||||
b::foo()
|
||||
}
|
24
src/test/compile-fail/svh-change-trait-bound.rs
Normal file
24
src/test/compile-fail/svh-change-trait-bound.rs
Normal file
@ -0,0 +1,24 @@
|
||||
// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
|
||||
// file at the top-level directory of this distribution and at
|
||||
// http://rust-lang.org/COPYRIGHT.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
||||
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
||||
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// note that these aux-build directives must be in this order
|
||||
// aux-build:svh-a-base.rs
|
||||
// aux-build:svh-b.rs
|
||||
// aux-build:svh-a-change-trait-bound.rs
|
||||
|
||||
#![feature(macro_rules)]
|
||||
|
||||
extern crate a;
|
||||
extern crate b; //~ ERROR: found possibly newer version of crate `a` which `b` depends on
|
||||
//~^ NOTE: perhaps this crate needs to be recompiled
|
||||
|
||||
fn main() {
|
||||
b::foo()
|
||||
}
|
23
src/test/run-pass/svh-add-comment.rs
Normal file
23
src/test/run-pass/svh-add-comment.rs
Normal file
@ -0,0 +1,23 @@
|
||||
// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
|
||||
// file at the top-level directory of this distribution and at
|
||||
// http://rust-lang.org/COPYRIGHT.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
||||
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
||||
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// note that these aux-build directives must be in this order
|
||||
// aux-build:svh-a-base.rs
|
||||
// aux-build:svh-b.rs
|
||||
// aux-build:svh-a-comment.rs
|
||||
|
||||
#![feature(macro_rules)]
|
||||
|
||||
extern crate a;
|
||||
extern crate b;
|
||||
|
||||
fn main() {
|
||||
b::foo()
|
||||
}
|
23
src/test/run-pass/svh-add-doc.rs
Normal file
23
src/test/run-pass/svh-add-doc.rs
Normal file
@ -0,0 +1,23 @@
|
||||
// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
|
||||
// file at the top-level directory of this distribution and at
|
||||
// http://rust-lang.org/COPYRIGHT.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
||||
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
||||
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// note that these aux-build directives must be in this order
|
||||
// aux-build:svh-a-base.rs
|
||||
// aux-build:svh-b.rs
|
||||
// aux-build:svh-a-doc.rs
|
||||
|
||||
#![feature(macro_rules)]
|
||||
|
||||
extern crate a;
|
||||
extern crate b;
|
||||
|
||||
fn main() {
|
||||
b::foo()
|
||||
}
|
23
src/test/run-pass/svh-add-macro.rs
Normal file
23
src/test/run-pass/svh-add-macro.rs
Normal file
@ -0,0 +1,23 @@
|
||||
// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
|
||||
// file at the top-level directory of this distribution and at
|
||||
// http://rust-lang.org/COPYRIGHT.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
||||
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
||||
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// note that these aux-build directives must be in this order
|
||||
// aux-build:svh-a-base.rs
|
||||
// aux-build:svh-b.rs
|
||||
// aux-build:svh-a-macro.rs
|
||||
|
||||
#![feature(macro_rules)]
|
||||
|
||||
extern crate a;
|
||||
extern crate b;
|
||||
|
||||
fn main() {
|
||||
b::foo()
|
||||
}
|
23
src/test/run-pass/svh-add-nothing.rs
Normal file
23
src/test/run-pass/svh-add-nothing.rs
Normal file
@ -0,0 +1,23 @@
|
||||
// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
|
||||
// file at the top-level directory of this distribution and at
|
||||
// http://rust-lang.org/COPYRIGHT.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
||||
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
||||
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// note that these aux-build directives must be in this order
|
||||
// aux-build:svh-a-base.rs
|
||||
// aux-build:svh-b.rs
|
||||
// aux-build:svh-a-no-change.rs
|
||||
|
||||
#![feature(macro_rules)]
|
||||
|
||||
extern crate a;
|
||||
extern crate b;
|
||||
|
||||
fn main() {
|
||||
b::foo()
|
||||
}
|
23
src/test/run-pass/svh-add-redundant-cfg.rs
Normal file
23
src/test/run-pass/svh-add-redundant-cfg.rs
Normal file
@ -0,0 +1,23 @@
|
||||
// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
|
||||
// file at the top-level directory of this distribution and at
|
||||
// http://rust-lang.org/COPYRIGHT.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
||||
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
||||
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// note that these aux-build directives must be in this order
|
||||
// aux-build:svh-a-base.rs
|
||||
// aux-build:svh-b.rs
|
||||
// aux-build:svh-a-redundant-cfg.rs
|
||||
|
||||
#![feature(macro_rules)]
|
||||
|
||||
extern crate a;
|
||||
extern crate b;
|
||||
|
||||
fn main() {
|
||||
b::foo()
|
||||
}
|
23
src/test/run-pass/svh-add-whitespace.rs
Normal file
23
src/test/run-pass/svh-add-whitespace.rs
Normal file
@ -0,0 +1,23 @@
|
||||
// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
|
||||
// file at the top-level directory of this distribution and at
|
||||
// http://rust-lang.org/COPYRIGHT.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
||||
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
||||
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
// note that these aux-build directives must be in this order
|
||||
// aux-build:svh-a-base.rs
|
||||
// aux-build:svh-b.rs
|
||||
// aux-build:svh-a-whitespace.rs
|
||||
|
||||
#![feature(macro_rules)]
|
||||
|
||||
extern crate a;
|
||||
extern crate b;
|
||||
|
||||
fn main() {
|
||||
b::foo()
|
||||
}
|
Loading…
Reference in New Issue
Block a user