Updated image
This commit is contained in:
@@ -9,7 +9,7 @@ Originally this readme was part of the Carbon Language project, licensed with Ap
|
|||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
||||||
<img src="code.png" align="right" width="575" alt="">
|
<img src="code.png" align="right" width="300" alt="">
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
Don't let the text wrap too narrowly to the left of the above image.
|
Don't let the text wrap too narrowly to the left of the above image.
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 60 KiB After Width: | Height: | Size: 53 KiB |
+10
-15
@@ -1,18 +1,13 @@
|
|||||||
fn main() {
|
pub class Player {
|
||||||
println!("running common tests...");
|
pub name String;
|
||||||
common::expr_test::run_tests();
|
pub hp i32;
|
||||||
common::statement_test::run_tests();
|
|
||||||
common::decl_test::run_tests();
|
|
||||||
common::types_test::run_tests();
|
|
||||||
|
|
||||||
println!("running items tests...");
|
pub constructor(name *str) {
|
||||||
items::function_test::run_tests();
|
self.hp = 100;
|
||||||
items::struct_test::run_tests();
|
self.name.to_string();
|
||||||
items::enum_test::run_tests();
|
}
|
||||||
items::class_test::run_tests();
|
|
||||||
items::trait_test::run_tests();
|
|
||||||
items::impl_test::run_tests();
|
|
||||||
items::attribute_test::run_tests();
|
|
||||||
|
|
||||||
println!("\x1b[32m\nAll tests passed!\x1b[0m");
|
pub fn is_dead(*self) bool {
|
||||||
|
self.hp <= 0
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user