diff options
Diffstat (limited to 'test/src')
| -rw-r--r-- | test/src/comp-tests.el | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/test/src/comp-tests.el b/test/src/comp-tests.el index d2b8f56d36f..125af64b569 100644 --- a/test/src/comp-tests.el +++ b/test/src/comp-tests.el | |||
| @@ -153,15 +153,25 @@ | |||
| 153 | (should (string= (comp-tests-concat-f "bar") "abcdabcabfoobar"))) | 153 | (should (string= (comp-tests-concat-f "bar") "abcdabcabfoobar"))) |
| 154 | 154 | ||
| 155 | (ert-deftest comp-tests-ffuncall () | 155 | (ert-deftest comp-tests-ffuncall () |
| 156 | "Testing varset." | 156 | "Test calling conventions." |
| 157 | (defun comp-tests-ffuncall-callee-f (x y z) | 157 | (defun comp-tests-ffuncall-callee-f (x y z) |
| 158 | (list x y z)) | 158 | (list x y z)) |
| 159 | (defun comp-tests-ffuncall-caller-f () | 159 | (defun comp-tests-ffuncall-caller-f () |
| 160 | (comp-tests-ffuncall-callee-f 1 2 3)) | 160 | (comp-tests-ffuncall-callee-f 1 2 3)) |
| 161 | |||
| 161 | (byte-compile #'comp-tests-ffuncall-caller-f) | 162 | (byte-compile #'comp-tests-ffuncall-caller-f) |
| 162 | (native-compile #'comp-tests-ffuncall-caller-f) | 163 | (native-compile #'comp-tests-ffuncall-caller-f) |
| 163 | 164 | ||
| 164 | (should (equal (comp-tests-ffuncall-caller-f) '(1 2 3)))) | 165 | (should (equal (comp-tests-ffuncall-caller-f) '(1 2 3))) |
| 166 | |||
| 167 | (defun comp-tests-ffuncall-native-f () | ||
| 168 | "Call a primitive with no dedicate op." | ||
| 169 | (make-vector 1 nil)) | ||
| 170 | |||
| 171 | (byte-compile #'comp-tests-ffuncall-native-f) | ||
| 172 | (native-compile #'comp-tests-ffuncall-native-f) | ||
| 173 | |||
| 174 | (should (vectorp (comp-tests-ffuncall-native-f)))) | ||
| 165 | 175 | ||
| 166 | (ert-deftest comp-tests-conditionals () | 176 | (ert-deftest comp-tests-conditionals () |
| 167 | "Testing conditionals." | 177 | "Testing conditionals." |