File tree 4 files changed +5
-29
lines changed
4 files changed +5
-29
lines changed Original file line number Diff line number Diff line change @@ -252,20 +252,6 @@ mod test {
252
252
});
253
253
}
254
254
255
- #[test]
256
- fn should_index_foreign_mod_pages() {
257
- let doc = mk_doc(
258
- config::DocPerMod,
259
- ~" extern mod a { } "
260
- );
261
- assert!((&doc.cratemod().index).get().entries[0] == doc::IndexEntry {
262
- kind: ~" Foreign module",
263
- name: ~" a",
264
- brief: None,
265
- link: ~" a. html"
266
- });
267
- }
268
-
269
255
#[test]
270
256
fn should_add_brief_desc_to_index() {
271
257
let doc = mk_doc(
@@ -280,7 +266,7 @@ mod test {
280
266
fn should_index_foreign_mod_contents() {
281
267
let doc = mk_doc(
282
268
config::DocPerCrate,
283
- ~" extern mod a { fn b( ) ; } "
269
+ ~" extern { fn b( ) ; } "
284
270
);
285
271
assert!((&doc.cratemod().nmods()[0].index).get().entries[0]
286
272
== doc::IndexEntry {
Original file line number Diff line number Diff line change @@ -702,31 +702,24 @@ mod test {
702
702
703
703
#[ test]
704
704
fn should_write_index_for_foreign_mods ( ) {
705
- let markdown = render ( ~"extern mod a { fn a( ) ; } ");
705
+ let markdown = render ( ~"extern { fn a ( ) ; } ") ;
706
706
assert ! ( str :: contains(
707
707
markdown,
708
708
~"\n \n * [ Function `a`] ( #function-a) \n \n "
709
709
) ) ;
710
710
}
711
711
712
- #[ test]
713
- fn should_write_foreign_mods ( ) {
714
- let markdown = render ( ~"#[ doc = \"test\" ] extern mod a { } ") ;
715
- assert ! ( str :: contains( markdown, ~"Foreign module `a`") ) ;
716
- assert ! ( str :: contains( markdown, ~"test"));
717
- }
718
-
719
712
#[ test]
720
713
fn should_write_foreign_fns ( ) {
721
714
let markdown = render (
722
- ~" extern mod a { #[ doc = \"test\" ] fn a( ) ; } ");
715
+ ~"extern { #[ doc = \"test\" ] fn a ( ) ; } ") ;
723
716
assert ! ( str :: contains( markdown, ~"test"));
724
717
}
725
718
726
719
#[test]
727
720
fn should_write_foreign_fn_headers() {
728
721
let markdown = render(
729
- ~" extern mod a { #[ doc = \"test\" ] fn a( ) ; } ");
722
+ ~" extern { #[ doc = \"test\" ] fn a( ) ; } ");
730
723
assert!(str::contains(markdown, ~" ## Function `a`") ) ;
731
724
}
732
725
Original file line number Diff line number Diff line change @@ -43,8 +43,6 @@ fn test() {
43
43
44
44
let source =
45
45
~"mod imod { } \
46
- extern mod inmod {
47
- } \
48
46
static iconst: int = 0 ; \
49
47
fn ifn ( ) { } \
50
48
enum ienum { ivar } \
@@ -63,6 +61,5 @@ fn test() {
63
61
assert!(doc.cratemod().items[5].name() == ~" __extensions__");
64
62
assert!(doc.cratemod().items[6].name() == ~" ifn");
65
63
assert!(doc.cratemod().items[7].name() == ~" imod" ) ;
66
- assert!(doc.cratemod().items[8].name() == ~" inmod" ) ;
67
64
}
68
65
}
Original file line number Diff line number Diff line change @@ -365,7 +365,7 @@ mod test {
365
365
366
366
#[test]
367
367
fn should_add_foreign_fn_sig() {
368
- let doc = mk_doc(~" extern mod a { fn a<T >( ) -> int; } ");
368
+ let doc = mk_doc(~" extern { fn a<T >( ) -> int; } ");
369
369
assert!(doc.cratemod().nmods()[0].fns[0].sig ==
370
370
Some(~" fn a<T >( ) -> int"));
371
371
}
You can’t perform that action at this time.
0 commit comments