Skip to content

Commit c1258d7

Browse files
committed
test: add standard_proofs_with_contracts and snapshots
1 parent 637d02a commit c1258d7

File tree

4 files changed

+6839
-2
lines changed

4 files changed

+6839
-2
lines changed

src/functions/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use rustc_smir::rustc_internal::internal;
55
use rustc_span::{Span, source_map::SourceMap};
66
use serde::Serialize;
77
use stable_mir::{
8-
CrateDef, DefId,
8+
CrateDef,
99
mir::mono::{Instance, MonoItem},
1010
ty::{FnDef, RigidTy, Ty, TyKind},
1111
};
@@ -20,7 +20,7 @@ pub fn analyze(tcx: TyCtxt, src_map: &SourceMap) -> Vec<Function> {
2020
let mut entries = Vec::with_capacity(cap);
2121

2222
for item in local_items {
23-
let _span = debug_span!("all_local_items", ?item).entered();
23+
let _span = error_span!("all_local_items", ?item).entered();
2424

2525
let Ok(inst) = Instance::try_from(item).inspect_err(|err| error!(?err)) else { continue };
2626
entries.push(MonoItem::from(inst));

tests/snapshots.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,9 @@ fn standard_proofs() {
1717
let json = cmd(&["tests/standard_proofs.rs"]);
1818
expect_file!["./snapshots/standard_proofs.json"].assert_eq(&json);
1919
}
20+
21+
#[test]
22+
fn standard_proofs_with_contracts() {
23+
let json = cmd(&["tests/standard_proofs_with_contracts.rs"]);
24+
expect_file!["./snapshots/standard_proofs_with_contracts.json"].assert_eq(&json);
25+
}

0 commit comments

Comments
 (0)