about summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
authorSebastian Ullrich <sebasti@nullri.ch>2015-09-20 15:18:41 +0200
committerSebastian Ullrich <sebasti@nullri.ch>2015-09-20 15:47:21 +0200
commit9bd502ad54a1ccea30d79e1cf5667fa9705fc221 (patch)
tree79991b6ccaf86058185167604c77365c7c526394 /tests
parentce2c4f6be61305c8bb487e0f7cae760f5918fe07 (diff)
Fix negative overflow and missing '..' on struct lit base exprs
Diffstat (limited to 'tests')
-rw-r--r--tests/source/expr.rs8
-rw-r--r--tests/target/expr.rs7
2 files changed, 15 insertions, 0 deletions
diff --git a/tests/source/expr.rs b/tests/source/expr.rs
index faa0d3775c7..4b5e262bd26 100644
--- a/tests/source/expr.rs
+++ b/tests/source/expr.rs
@@ -173,3 +173,11 @@ fn arrays() {
 
     [ 1 +   3, 4 ,  5, 6, 7, 7, fncall::<Vec<_>>(3-1)]
 }
+
+fn struct_exprs() {
+    Foo
+    { a :  1, b:f( 2)};
+    Foo{a:1,b:f(2),..g(3)};
+    // FIXME: should be wrapped (#231)
+    LoooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooongStruct { ..base };
+}
diff --git a/tests/target/expr.rs b/tests/target/expr.rs
index bb629f12126..7b579960d53 100644
--- a/tests/target/expr.rs
+++ b/tests/target/expr.rs
@@ -183,3 +183,10 @@ fn arrays() {
 
     [1 + 3, 4, 5, 6, 7, 7, fncall::<Vec<_>>(3 - 1)]
 }
+
+fn struct_exprs() {
+    Foo { a: 1, b: f(2) };
+    Foo { a: 1, b: f(2), ..g(3) };
+    // FIXME: should be wrapped (#231)
+    LoooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooongStruct { ..base };
+}