提交 20cccfa6 编写于 作者: S Seo Sanghyeon

Change tests per RFC 246 (const vs static)

上级 5180a7cc
......@@ -13,5 +13,4 @@ pub fn cci_fn() -> usize {
1200
}
#[inline]
pub static CCI_STATIC: usize = 34;
pub const CCI_CONST: usize = 34;
......@@ -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) {
......
......@@ -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
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册