diff options
| author | Mitja Felicijan <mitja.felicijan@gmail.com> | 2026-01-22 00:35:39 +0100 |
|---|---|---|
| committer | Mitja Felicijan <mitja.felicijan@gmail.com> | 2026-01-22 00:35:39 +0100 |
| commit | 52040cc19cbdca48f91d4eb91e9b7a782bb5fbd0 (patch) | |
| tree | 8c6a61f5a6db99c4c7a663e1e2c0f069c3794c4b /tests/test.rs | |
| parent | 8ab1da7853f6dd309f2d3677ca109737f929ab4a (diff) | |
| download | crep-52040cc19cbdca48f91d4eb91e9b7a782bb5fbd0.tar.gz | |
Add Rust, Go and rename examples to tests
Diffstat (limited to 'tests/test.rs')
| -rw-r--r-- | tests/test.rs | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/tests/test.rs b/tests/test.rs new file mode 100644 index 0000000..c2d1091 --- /dev/null +++ b/tests/test.rs @@ -0,0 +1,31 @@ +fn main() { + println!("Hello, world!"); +} + +fn add(a: i32, b: i32) -> i32 { + a + b +} + +struct Point { + x: f64, + y: f64, +} + +enum Direction { + Up, + Down, + Left, + Right, +} + +trait Describe { + fn describe(&self) -> String; +} + +impl Describe for Point { + fn describe(&self) -> String { + format!("Point at ({}, {})", self.x, self.y) + } +} + +const MAX_POINTS: u32 = 100; |
