#![allow(unused)]
use proc_utils::*;
#[docify_clone::export]
struct MyCoolStruct {
field1: u32,
field2: bool,
}
#[docify_clone::export]
#[test]
fn some_random_test() {
assert_eq!(2 + 2, 4);
}
#[docify_clone::export(test_with_custom_name)]
#[test]
fn another_test() {
assert_eq!(2 + 3, 5);
}
trait DoSomething {
fn do_something();
}
#[docify_clone::export(SomeImpl)]
impl DoSomething for MyCoolStruct {
fn do_something() {
println!("foo!");
}
}
#[docify_clone::export(Duplicate)]
struct _StructOne;
#[docify_clone::export(Duplicate)]
struct _StructTwo;
#[docify_clone::export(Duplicate)]
struct _StructThree;
#[docify_clone::export]
#[allow(unused)]
fn runnable() {
assert_eq!(2 + 2, 4);
}
#[docify_clone::export]
fn some_example() {
assert_eq!(2 + 2, 4);
assert_eq!(2 + 3, 5);
assert_eq!(3 + 3, 6);
}
#[docify_clone::export]
fn some_complex_example() {
assert_eq!(2 + 2, 4);
assert_eq!(2 + 3, 5);
assert_eq!(3 + 3, 6);
}
#[rustfmt::skip]
mod bad {
#[docify_clone::export]
fn
wonky_comment_example() {
println!("hello world");
}
}
#[docify_clone::export]
#[test]
fn test_with_normal_ordering() {
assert_eq!(2 + 2, 4);
}
#[test]
#[docify_clone::export]
fn test_with_weird_ordering() {
assert_eq!(2 + 2, 4);
}
#[test]
#[docify_clone::export]
fn docify_keyword_in_comments() {
assert_eq!(2 + 3, 5);
}
mod some_module {
use super::*;
#[docify_clone::export]
#[rustfmt::skip]
#[suppress_item]
fn oliver_substrate_example_2() {
assert_events(vec![
UpgradeStarted { migrations: 2 },
MigrationAdvanced { index: 0, blocks: 1 },
MigrationCompleted { index: 0, blocks: 2 },
MigrationAdvanced { index: 1, blocks: 0 },
MigrationAdvanced { index: 1, blocks: 1 },
MigrationCompleted { index: 1, blocks: 2 },
UpgradeCompleted,
]);
}
}
#[docify_clone::export]
struct LiamIssue7;
fn main() {}
trait SomeTrait {
fn trait_impl_method();
}
pub struct Liam9;
impl SomeTrait for Liam9 {
#[docify_clone::export]
fn trait_impl_method() {
println!("foo!");
}
}
#[docify_clone::export_content]
trait SomeOtherTrait {
fn foo();
fn bar();
type Something;
}
#[docify_clone::export_content(impl_some_other_trait_for_my_cool_struct)]
impl SomeOtherTrait for MyCoolStruct {
fn foo() {
println!("foo!");
}
fn bar() {
println!("bar!");
}
type Something = ();
}
#[docify_clone::export_content]
pub fn some_other_fn(x: i32, y: i32) -> Result<i32, i32> {
if x > 10 {
Ok(33)
} else if y < 10 {
Ok(44)
} else {
Err(420)
}
}
#[docify_clone::export_content]
const MY_CONST: &'static str = "hello world";
#[docify_clone::export]
pub mod outer_mod {
pub fn hello() {
println!("hello");
}
#[docify_clone::export]
pub fn outer_foo() {
println!("foo!");
}
#[docify_clone::export]
pub mod inner_mod {
const SOMETHING: i32 = 55;
#[docify_clone::export]
pub fn inner_inner_bar() {
println!("bar!");
}
#[docify_clone::export_content]
pub fn inner_inner_fizz() {
println!("fizz!");
}
}
#[docify_clone::export_content]
pub mod inner_mod2 {
#[docify_clone::export]
pub fn inner_inner_wiz() {
println!("wiz!");
}
}
}