Skip to content

Commit be223e4

Browse files
committed
test bundle rename and rename-prefix
1 parent fa47096 commit be223e4

File tree

4 files changed

+13
-3
lines changed

4 files changed

+13
-3
lines changed

test/rust-val/AuxB.fsti

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module AuxB
2+
3+
val bar : bool -> bool

test/rust-val/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,9 @@ $(CACHE_DIR)/%.checked: | .depend
5656

5757
.PRECIOUS: %.rs
5858
%.rs: $(ALL_KRML_FILES) $(KRML_BIN)
59-
$(KRML) -minimal -bundle $(notdir $(subst rust,Rust,$*))=\* \
59+
$(KRML) -minimal -bundle AuxA+AuxB=[rename=Aux,rename-prefix] -bundle $(notdir $(subst rust,Rust,$*))=\* \
6060
-backend rust $(EXTRA) -tmpdir $(dir $@) $(filter %.krml,$^)
61-
$(SED) -i 's/\(patterns..\)/\1\nmod auxa; mod lowstar { pub mod ignore { pub fn ignore<T>(_x: T) {}}}\n/' $@
61+
$(SED) -i 's/\(patterns..\)/\1\nmod aux; mod lowstar { pub mod ignore { pub fn ignore<T>(_x: T) {}}}\n/' $@
6262
echo 'fn main () { let r = main_ (); if r != 0 { println!("main_ returned: {}\\n", r); panic!() } }' >> $@
6363

6464
%.rust-test: %.rs

test/rust-val/Rusttest.fst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@ let test2 (b: B.buffer bool) : HST.Stack bool
99
(fun _ _ _ -> True)
1010
=
1111
let x = B.index b C._zero_for_deref in
12-
AuxA.foo x
12+
let r1 = AuxA.foo x in
13+
let r2 = AuxB.bar x in
14+
r1 && r2
1315

1416
let main_ () : HST.Stack I32.t
1517
(fun _ -> True)
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,8 @@ pub fn foo(x: bool) -> bool
88
{
99
return !x;
1010
}
11+
12+
pub fn bar(x: bool) -> bool
13+
{
14+
return x;
15+
}

0 commit comments

Comments
 (0)