about summary refs log tree commit diff
path: root/tests/source
diff options
context:
space:
mode:
authorNick Cameron <nrc@ncameron.org>2017-05-02 10:45:23 +1200
committerGitHub <noreply@github.com>2017-05-02 10:45:23 +1200
commit7fb288f0b34cef22f31b6b4c223cd7807d0cbd84 (patch)
tree4eaa04ae07b8b086b1c30d04204b20d22afa2ee4 /tests/source
parentc546f1b396f7bfad89f30d9f595baa589a99a4fe (diff)
parentc7e9bcadaab1665b5e46797984c6a8ab3885718a (diff)
Merge pull request #1487 from topecongiro/issue1470
Use block indent when visual indent exceeds max_width
Diffstat (limited to 'tests/source')
-rw-r--r--tests/source/large_vec.rs29
1 files changed, 29 insertions, 0 deletions
diff --git a/tests/source/large_vec.rs b/tests/source/large_vec.rs
new file mode 100644
index 00000000000..34d5bf39954
--- /dev/null
+++ b/tests/source/large_vec.rs
@@ -0,0 +1,29 @@
+// See #1470.
+
+impl Environment {
+    pub fn new_root() -> Rc<RefCell<Environment>> {
+        let mut env = Environment::new();
+        let builtin_functions = &[("println",
+                                   Function::NativeVoid(CallSign {
+                                                            num_params: 0,
+                                                            variadic: true,
+                                                            param_types: vec![],
+                                                        },
+                                                        native_println)),
+                                  ("run_http_server",
+                                   Function::NativeVoid(CallSign {
+                                                            num_params: 1,
+                                                            variadic: false,
+                                                            param_types:
+                                                                vec![Some(ConstraintType::Function)],
+                                                        },
+                                                        native_run_http_server)),
+                                  ("len",
+                                   Function::NativeReturning(CallSign {
+                                                                 num_params: 1,
+                                                                 variadic: false,
+                                                                 param_types: vec![None],
+                                                             },
+                                                             native_len))];
+    }
+}