Skip to content

Commit

Permalink
Change tests per RFC 246 (const vs static)
Browse files Browse the repository at this point in the history
  • Loading branch information
sanxiyn committed Oct 2, 2015
1 parent 5180a7c commit 20cccfa
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 11 deletions.
3 changes: 1 addition & 2 deletions src/test/auxiliary/sepcomp_cci_lib.rs
Expand Up @@ -13,5 +13,4 @@ pub fn cci_fn() -> usize {
1200
}

#[inline]
pub static CCI_STATIC: usize = 34;
pub const CCI_CONST: usize = 34;
3 changes: 0 additions & 3 deletions src/test/auxiliary/xcrate_static_addresses.rs
Expand Up @@ -8,13 +8,10 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#[inline(never)]
pub static global: isize = 3;

#[inline(never)]
static global0: isize = 4;

#[inline(never)]
pub static global2: &'static isize = &global0;

pub fn verify_same(a: &'static isize) {
Expand Down
12 changes: 6 additions & 6 deletions src/test/run-pass/sepcomp-cci.rs
Expand Up @@ -16,23 +16,23 @@


extern crate sepcomp_cci_lib;
use sepcomp_cci_lib::{cci_fn, CCI_STATIC};
use sepcomp_cci_lib::{cci_fn, CCI_CONST};

fn call1() -> usize {
cci_fn() + CCI_STATIC
cci_fn() + CCI_CONST
}

mod a {
use sepcomp_cci_lib::{cci_fn, CCI_STATIC};
use sepcomp_cci_lib::{cci_fn, CCI_CONST};
pub fn call2() -> usize {
cci_fn() + CCI_STATIC
cci_fn() + CCI_CONST
}
}

mod b {
use sepcomp_cci_lib::{cci_fn, CCI_STATIC};
use sepcomp_cci_lib::{cci_fn, CCI_CONST};
pub fn call3() -> usize {
cci_fn() + CCI_STATIC
cci_fn() + CCI_CONST
}
}

Expand Down

0 comments on commit 20cccfa

Please sign in to comment.