summaryrefslogtreecommitdiff
path: root/tests/test.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test.rs')
-rw-r--r--tests/test.rs31
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;