summaryrefslogtreecommitdiff
path: root/examples/07-native-type-custom-config
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2026-07-14 19:01:50 +0100
committerMichael Williamson <mike@zwobble.org>2026-07-14 19:01:50 +0100
commit92bbc3595c39e964160660a2de9aa76b72ce727f (patch)
tree00979e144541fd594145e52fc92874b244cd2352 /examples/07-native-type-custom-config
parent6194d284f5559acc5f23a402f577bac655878f92 (diff)
Convert Rust examples to use cargo test
Diffstat (limited to 'examples/07-native-type-custom-config')
-rw-r--r--examples/07-native-type-custom-config/output/rust/src/main.rs12
1 files changed, 8 insertions, 4 deletions
diff --git a/examples/07-native-type-custom-config/output/rust/src/main.rs b/examples/07-native-type-custom-config/output/rust/src/main.rs
index af7be7f..164fa14 100644
--- a/examples/07-native-type-custom-config/output/rust/src/main.rs
+++ b/examples/07-native-type-custom-config/output/rust/src/main.rs
@@ -1,9 +1,13 @@
mod point;
-use point::Line;
-
struct Point(i32, i32);
-fn main() {
- let line = Line { start: Point(10, 25), end: Point(25, 10) };
+#[cfg(test)]
+mod test {
+ use super::{Point, point::Line};
+
+ #[test]
+ fn can_use_native_types() {
+ let line = Line { start: Point(10, 25), end: Point(25, 10) };
+ }
}