Change tests per RFC 246 (const vs static)

This commit is contained in:
Seo Sanghyeon 2015-09-25 18:44:36 +09:00
parent 5180a7ccc5
commit 20cccfa67f
3 changed files with 7 additions and 11 deletions

View file

@ -13,5 +13,4 @@ pub fn cci_fn() -> usize {
1200
}
#[inline]
pub static CCI_STATIC: usize = 34;
pub const CCI_CONST: usize = 34;

View file

@ -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) {

View file

@ -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
}
}