aboutsummaryrefslogtreecommitdiffstats
path: root/test/src
diff options
context:
space:
mode:
authorAndrea Corallo2019-07-20 17:50:51 +0200
committerAndrea Corallo2020-01-01 11:33:55 +0100
commit13651c52ca6c90265fe568a62db1f81152cfbfa7 (patch)
treef7ef34ef185962c7b933c5730842ebf8a23b4254 /test/src
parent231c71706b3b5eec8038986f54198a8983ae83c0 (diff)
downloademacs-13651c52ca6c90265fe568a62db1f81152cfbfa7.tar.gz
emacs-13651c52ca6c90265fe568a62db1f81152cfbfa7.zip
uncommenting some test
Diffstat (limited to 'test/src')
-rw-r--r--test/src/comp-tests.el292
1 files changed, 146 insertions, 146 deletions
diff --git a/test/src/comp-tests.el b/test/src/comp-tests.el
index d11cf8657c6..938bf53c014 100644
--- a/test/src/comp-tests.el
+++ b/test/src/comp-tests.el
@@ -230,109 +230,109 @@
230 (should (= (comp-tests-conditionals-2-f t) 1340)) 230 (should (= (comp-tests-conditionals-2-f t) 1340))
231 (should (eq (comp-tests-conditionals-2-f nil) nil))) 231 (should (eq (comp-tests-conditionals-2-f nil) nil)))
232 232
233;; (ert-deftest comp-tests-fixnum () 233(ert-deftest comp-tests-fixnum ()
234;; "Testing some fixnum inline operation." 234 "Testing some fixnum inline operation."
235;; (defun comp-tests-fixnum-1-minus-f (x) 235 (defun comp-tests-fixnum-1-minus-f (x)
236;; ;; Bsub1 236 ;; Bsub1
237;; (1- x)) 237 (1- x))
238;; (defun comp-tests-fixnum-1-plus-f (x) 238 (defun comp-tests-fixnum-1-plus-f (x)
239;; ;; Badd1 239 ;; Badd1
240;; (1+ x)) 240 (1+ x))
241;; (defun comp-tests-fixnum-minus-f (x) 241 (defun comp-tests-fixnum-minus-f (x)
242;; ;; Bnegate 242 ;; Bnegate
243;; (- x)) 243 (- x))
244 244
245;; (native-compile #'comp-tests-fixnum-1-minus-f) 245 (native-compile #'comp-tests-fixnum-1-minus-f)
246;; (native-compile #'comp-tests-fixnum-1-plus-f) 246 (native-compile #'comp-tests-fixnum-1-plus-f)
247;; (native-compile #'comp-tests-fixnum-minus-f) 247 (native-compile #'comp-tests-fixnum-minus-f)
248 248
249;; (should (= (comp-tests-fixnum-1-minus-f 10) 9)) 249 (should (= (comp-tests-fixnum-1-minus-f 10) 9))
250;; (should (= (comp-tests-fixnum-1-minus-f most-negative-fixnum) 250 (should (= (comp-tests-fixnum-1-minus-f most-negative-fixnum)
251;; (1- most-negative-fixnum))) 251 (1- most-negative-fixnum)))
252;; (should (equal (condition-case err 252 (should (equal (condition-case err
253;; (comp-tests-fixnum-1-minus-f 'a) 253 (comp-tests-fixnum-1-minus-f 'a)
254;; (error err)) 254 (error err))
255;; '(wrong-type-argument number-or-marker-p a))) 255 '(wrong-type-argument number-or-marker-p a)))
256;; (should (= (comp-tests-fixnum-1-plus-f 10) 11)) 256 (should (= (comp-tests-fixnum-1-plus-f 10) 11))
257;; (should (= (comp-tests-fixnum-1-plus-f most-positive-fixnum) 257 (should (= (comp-tests-fixnum-1-plus-f most-positive-fixnum)
258;; (1+ most-positive-fixnum))) 258 (1+ most-positive-fixnum)))
259;; (should (equal (condition-case err 259 (should (equal (condition-case err
260;; (comp-tests-fixnum-1-plus-f 'a) 260 (comp-tests-fixnum-1-plus-f 'a)
261;; (error err)) 261 (error err))
262;; '(wrong-type-argument number-or-marker-p a))) 262 '(wrong-type-argument number-or-marker-p a)))
263;; (should (= (comp-tests-fixnum-minus-f 10) -10)) 263 (should (= (comp-tests-fixnum-minus-f 10) -10))
264;; (should (= (comp-tests-fixnum-minus-f most-negative-fixnum) 264 (should (= (comp-tests-fixnum-minus-f most-negative-fixnum)
265;; (- most-negative-fixnum))) 265 (- most-negative-fixnum)))
266;; (should (equal (condition-case err 266 (should (equal (condition-case err
267;; (comp-tests-fixnum-minus-f 'a) 267 (comp-tests-fixnum-minus-f 'a)
268;; (error err)) 268 (error err))
269;; '(wrong-type-argument number-or-marker-p a)))) 269 '(wrong-type-argument number-or-marker-p a))))
270 270
271;; (ert-deftest comp-tests-arith-comp () 271(ert-deftest comp-tests-arith-comp ()
272;; "Testing arithmetic comparisons." 272 "Testing arithmetic comparisons."
273;; (defun comp-tests-eqlsign-f (x y) 273 (defun comp-tests-eqlsign-f (x y)
274;; ;; Beqlsign 274 ;; Beqlsign
275;; (= x y)) 275 (= x y))
276;; (defun comp-tests-gtr-f (x y) 276 (defun comp-tests-gtr-f (x y)
277;; ;; Bgtr 277 ;; Bgtr
278;; (> x y)) 278 (> x y))
279;; (defun comp-tests-lss-f (x y) 279 (defun comp-tests-lss-f (x y)
280;; ;; Blss 280 ;; Blss
281;; (< x y)) 281 (< x y))
282;; (defun comp-tests-les-f (x y) 282 (defun comp-tests-les-f (x y)
283;; ;; Bleq 283 ;; Bleq
284;; (<= x y)) 284 (<= x y))
285;; (defun comp-tests-geq-f (x y) 285 (defun comp-tests-geq-f (x y)
286;; ;; Bgeq 286 ;; Bgeq
287;; (>= x y)) 287 (>= x y))
288 288
289 289
290;; (native-compile #'comp-tests-eqlsign-f) 290 (native-compile #'comp-tests-eqlsign-f)
291;; (native-compile #'comp-tests-gtr-f) 291 (native-compile #'comp-tests-gtr-f)
292;; (native-compile #'comp-tests-lss-f) 292 (native-compile #'comp-tests-lss-f)
293;; (native-compile #'comp-tests-les-f) 293 (native-compile #'comp-tests-les-f)
294;; (native-compile #'comp-tests-geq-f) 294 (native-compile #'comp-tests-geq-f)
295 295
296;; (should (eq (comp-tests-eqlsign-f 4 3) nil)) 296 (should (eq (comp-tests-eqlsign-f 4 3) nil))
297;; (should (eq (comp-tests-eqlsign-f 3 3) t)) 297 (should (eq (comp-tests-eqlsign-f 3 3) t))
298;; (should (eq (comp-tests-eqlsign-f 2 3) nil)) 298 (should (eq (comp-tests-eqlsign-f 2 3) nil))
299;; (should (eq (comp-tests-gtr-f 4 3) t)) 299 (should (eq (comp-tests-gtr-f 4 3) t))
300;; (should (eq (comp-tests-gtr-f 3 3) nil)) 300 (should (eq (comp-tests-gtr-f 3 3) nil))
301;; (should (eq (comp-tests-gtr-f 2 3) nil)) 301 (should (eq (comp-tests-gtr-f 2 3) nil))
302;; (should (eq (comp-tests-lss-f 4 3) nil)) 302 (should (eq (comp-tests-lss-f 4 3) nil))
303;; (should (eq (comp-tests-lss-f 3 3) nil)) 303 (should (eq (comp-tests-lss-f 3 3) nil))
304;; (should (eq (comp-tests-lss-f 2 3) t)) 304 (should (eq (comp-tests-lss-f 2 3) t))
305;; (should (eq (comp-tests-les-f 4 3) nil)) 305 (should (eq (comp-tests-les-f 4 3) nil))
306;; (should (eq (comp-tests-les-f 3 3) t)) 306 (should (eq (comp-tests-les-f 3 3) t))
307;; (should (eq (comp-tests-les-f 2 3) t)) 307 (should (eq (comp-tests-les-f 2 3) t))
308;; (should (eq (comp-tests-geq-f 4 3) t)) 308 (should (eq (comp-tests-geq-f 4 3) t))
309;; (should (eq (comp-tests-geq-f 3 3) t)) 309 (should (eq (comp-tests-geq-f 3 3) t))
310;; (should (eq (comp-tests-geq-f 2 3) nil))) 310 (should (eq (comp-tests-geq-f 2 3) nil)))
311 311
312;; (ert-deftest comp-tests-setcarcdr () 312(ert-deftest comp-tests-setcarcdr ()
313;; "Testing setcar setcdr." 313 "Testing setcar setcdr."
314;; (defun comp-tests-setcar-f (x y) 314 (defun comp-tests-setcar-f (x y)
315;; (setcar x y) 315 (setcar x y)
316;; x) 316 x)
317;; (defun comp-tests-setcdr-f (x y) 317 (defun comp-tests-setcdr-f (x y)
318;; (setcdr x y) 318 (setcdr x y)
319;; x) 319 x)
320 320
321;; (native-compile #'comp-tests-setcar-f) 321 (native-compile #'comp-tests-setcar-f)
322;; (native-compile #'comp-tests-setcdr-f) 322 (native-compile #'comp-tests-setcdr-f)
323 323
324;; (should (equal (comp-tests-setcar-f '(10 . 10) 3) '(3 . 10))) 324 (should (equal (comp-tests-setcar-f '(10 . 10) 3) '(3 . 10)))
325;; (should (equal (comp-tests-setcdr-f '(10 . 10) 3) '(10 . 3))) 325 (should (equal (comp-tests-setcdr-f '(10 . 10) 3) '(10 . 3)))
326;; (should (equal (condition-case 326 (should (equal (condition-case
327;; err 327 err
328;; (comp-tests-setcar-f 3 10) 328 (comp-tests-setcar-f 3 10)
329;; (error err)) 329 (error err))
330;; '(wrong-type-argument consp 3))) 330 '(wrong-type-argument consp 3)))
331;; (should (equal (condition-case 331 (should (equal (condition-case
332;; err 332 err
333;; (comp-tests-setcdr-f 3 10) 333 (comp-tests-setcdr-f 3 10)
334;; (error err)) 334 (error err))
335;; '(wrong-type-argument consp 3)))) 335 '(wrong-type-argument consp 3))))
336 336
337;; (ert-deftest comp-tests-bubble-sort () 337;; (ert-deftest comp-tests-bubble-sort ()
338;; "Run bubble sort." 338;; "Run bubble sort."
@@ -355,44 +355,44 @@
355;; (should (equal (comp-bubble-sort-f list1) 355;; (should (equal (comp-bubble-sort-f list1)
356;; (sort list2 #'<))))) 356;; (sort list2 #'<)))))
357 357
358;; (ert-deftest comp-tests-list-inline () 358(ert-deftest comp-tests-list-inline ()
359;; "Test some inlined list functions." 359 "Test some inlined list functions."
360;; (defun comp-tests-consp-f (x) 360 (defun comp-tests-consp-f (x)
361;; ;; Bconsp 361 ;; Bconsp
362;; (consp x)) 362 (consp x))
363;; (defun comp-tests-car-f (x) 363 (defun comp-tests-car-f (x)
364;; ;; Bsetcar 364 ;; Bsetcar
365;; (setcar x 3)) 365 (setcar x 3))
366 366
367;; (native-compile #'comp-tests-consp-f) 367 (native-compile #'comp-tests-consp-f)
368;; (native-compile #'comp-tests-car-f) 368 (native-compile #'comp-tests-car-f)
369 369
370;; (should (eq (comp-tests-consp-f '(1)) t)) 370 (should (eq (comp-tests-consp-f '(1)) t))
371;; (should (eq (comp-tests-consp-f 1) nil)) 371 (should (eq (comp-tests-consp-f 1) nil))
372;; (let ((x (cons 1 2))) 372 (let ((x (cons 1 2)))
373;; (should (= (comp-tests-car-f x) 3)) 373 (should (= (comp-tests-car-f x) 3))
374;; (should (equal x '(3 . 2))))) 374 (should (equal x '(3 . 2)))))
375 375
376;; (ert-deftest comp-tests-num-inline () 376(ert-deftest comp-tests-num-inline ()
377;; "Test some inlined number functions." 377 "Test some inlined number functions."
378;; (defun comp-tests-integerp-f (x) 378 (defun comp-tests-integerp-f (x)
379;; ;; Bintegerp 379 ;; Bintegerp
380;; (integerp x)) 380 (integerp x))
381;; (defun comp-tests-numberp-f (x) 381 (defun comp-tests-numberp-f (x)
382;; ;; Bnumberp 382 ;; Bnumberp
383;; (numberp x)) 383 (numberp x))
384 384
385;; (native-compile #'comp-tests-integerp-f) 385 (native-compile #'comp-tests-integerp-f)
386;; (native-compile #'comp-tests-numberp-f) 386 (native-compile #'comp-tests-numberp-f)
387 387
388;; (should (eq (comp-tests-integerp-f 1) t)) 388 (should (eq (comp-tests-integerp-f 1) t))
389;; (should (eq (comp-tests-integerp-f '(1)) nil)) 389 (should (eq (comp-tests-integerp-f '(1)) nil))
390;; (should (eq (comp-tests-integerp-f 3.5) nil)) 390 (should (eq (comp-tests-integerp-f 3.5) nil))
391;; (should (eq (comp-tests-integerp-f (1+ most-negative-fixnum)) t)) 391 (should (eq (comp-tests-integerp-f (1+ most-negative-fixnum)) t))
392 392
393;; (should (eq (comp-tests-numberp-f 1) t)) 393 (should (eq (comp-tests-numberp-f 1) t))
394;; (should (eq (comp-tests-numberp-f 'a) nil)) 394 (should (eq (comp-tests-numberp-f 'a) nil))
395;; (should (eq (comp-tests-numberp-f 3.5) t))) 395 (should (eq (comp-tests-numberp-f 3.5) t)))
396 396
397;; (ert-deftest comp-tests-stack () 397;; (ert-deftest comp-tests-stack ()
398;; "Test some stack operation." 398;; "Test some stack operation."
@@ -467,11 +467,11 @@
467;; (should (= (catch 'foo 467;; (should (= (catch 'foo
468;; (comp-tests-throw-f 3))))) 468;; (comp-tests-throw-f 3)))))
469 469
470;; (ert-deftest comp-tests-gc () 470(ert-deftest comp-tests-gc ()
471;; "Try to do some longer computation to let the gc kick in." 471 "Try to do some longer computation to let the gc kick in."
472;; (dotimes (_ 100000) 472 (dotimes (_ 100000)
473;; (comp-tests-cons-cdr-f 3)) 473 (comp-tests-cons-cdr-f 3))
474 474
475;; (should (= (comp-tests-cons-cdr-f 3) 3))) 475 (should (= (comp-tests-cons-cdr-f 3) 3)))
476 476
477;;; comp-tests.el ends here 477;;; comp-tests.el ends here