diff options
| author | Marcus Klaas <mail@marcusklaas.nl> | 2015-07-20 23:29:25 +0200 |
|---|---|---|
| committer | Marcus Klaas <mail@marcusklaas.nl> | 2015-07-24 19:00:14 +0200 |
| commit | c4101de53d8a0707907cb03c67a9224ab9943d37 (patch) | |
| tree | 4b28a2886c4dd0042c784e3a94ed2b5c4b552ccc /tests/source/expr.rs | |
| parent | 2fa6220f57228d149f99272a4b3f97b560359738 (diff) | |
Refactor some things; add extra tests.
Diffstat (limited to 'tests/source/expr.rs')
| -rw-r--r-- | tests/source/expr.rs | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/source/expr.rs b/tests/source/expr.rs index 19baa90ace2..1c063cf7f9d 100644 --- a/tests/source/expr.rs +++ b/tests/source/expr.rs @@ -14,6 +14,10 @@ some_ridiculously_loooooooooooooooooooooong_function(10000 * 30000000000 + 40000 (((((((((aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + a + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + aaaaa))))))))); + { for _ in 0..10 {} } + + {{{{}}}} + if 1 + 2 > 0 { let result = 5; result } else { 4}; if let Some(x) = aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa { @@ -30,6 +34,10 @@ some_ridiculously_loooooooooooooooooooooong_function(10000 * 30000000000 + 40000 if let (some_very_large, tuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuple) = 1111 + 2222 {} + if let (some_very_large, tuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuple) = 1 + + 2 + 3 { + } + if cond() { something(); } else if different_cond() { @@ -39,3 +47,19 @@ some_ridiculously_loooooooooooooooooooooong_function(10000 * 30000000000 + 40000 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa } } + +fn bar() { + let range = ( 111111111 + 333333333333333333 + 1111 + 400000000000000000) .. (2222 + 2333333333333333); + + let another_range = 5..some_func( a , b /* comment */); + + for _ in 1 ..{ call_forever(); } + + syntactically_correct(loop { sup( '?'); }, if cond { 0 } else { 1 }); + + let third = ..10; + let infi_range = ..; + let foo = 1..; + let bar = 5; + let nonsense = (10 .. 0)..(0..10); +} |
