1Date: Sun, 13 Nov 2016 09:40:36 +0100 2Subject: [PATCH] Rename and fix up LFE test suites 3 4--- 5 test/{andor_SUITE.lfe => lfe_andor_SUITE.lfe} | 16 ++++++++-------- 6 test/{guard_SUITE.lfe => lfe_guard_SUITE.lfe} | 8 ++++---- 7 2 files changed, 12 insertions(+), 12 deletions(-) 8 rename test/{andor_SUITE.lfe => lfe_andor_SUITE.lfe} (97%) 9 rename test/{guard_SUITE.lfe => lfe_guard_SUITE.lfe} (99%) 10 11diff --git a/test/andor_SUITE.lfe b/test/lfe_andor_SUITE.lfe 12similarity index 97% 13rename from test/andor_SUITE.lfe 14rename to test/lfe_andor_SUITE.lfe 15index 64feddd..1802b3f 100644 16--- a/test/andor_SUITE.lfe 17+++ b/test/lfe_andor_SUITE.lfe 18@@ -26,14 +26,14 @@ 19 20 (include-file "test_server.lfe") 21 22-(defmodule andor_SUITE 23+(defmodule lfe_andor_SUITE 24 (export (all 0) (suite 0) (groups 0) (init_per_suite 1) (end_per_suite 1) 25 (init_per_group 2) (end_per_group 2) 26 (t_case 1) (t_and_or 1) (t_andalso 1) (t_orelse 1) (inside 1) 27 (overlap 1) (combined 1) (in_case 1) (before_and_inside_if 1) 28 )) 29 30-(defmacro MODULE () `'andor_SUITE) 31+(defmacro MODULE () `'lfe_andor_SUITE) 32 33 (defun all () 34 ;; (: test_lib recompile (MODULE)) 35@@ -206,7 +206,7 @@ 36 37 (defun t-andalso-1 38 ([(tuple x y)] 39- (: lfe_io format '"(andalso ~w ~w): " (list x y)) 40+ (: io format '"(andalso ~w ~w): " (list x y)) 41 (let* ((v0 (andalso (echo x) (echo y))) 42 (v1 (when (=:= v0 v1)) 43 (eif (andalso x y) 'true 'true 'false))) 44@@ -248,7 +248,7 @@ 45 46 (defun t-orelse-1 47 ([(tuple x y)] 48- (: lfe_io format '"(orelse ~w ~w): " (list x y)) 49+ (: io format '"(orelse ~w ~w): " (list x y)) 50 (let* ((v0 (orelse (echo x) (echo y))) 51 (v1 (when (=:= v0 v1)) 52 (eif (orelse x y) 'true 'true 'false))) 53@@ -289,7 +289,7 @@ 54 (when (=:= r1 r2) (=:= xm xm2) (=:= ym ym2) (=:= x x2) 55 (=:= y y2) (=:= w w2) (=:= h h2)) 56 (inside-guard xm ym x y w h))) 57- (: lfe_io fwrite 58+ (: io fwrite 59 '"(andalso (=< ~p ~p) (< ~p ~p) (=< ~p ~p) (< ~p ~p)) ==> ~p\n" 60 (list x xm xm (+ x w) y ym ym (+ y h) r1))) 61 r1)) 62@@ -499,12 +499,12 @@ 63 ;; Utilities 64 65 (defun check (v1 v0) 66- (eif (/= v1 v0) (progn (: lfe_io fwrite '"error: ~w.\n" (list v1)) 67+ (eif (/= v1 v0) (progn (: io fwrite '"error: ~w.\n" (list v1)) 68 (exit 'suite_failed)) 69- 'true (: lfe_io fwrite '"ok: ~w.\n" (list v1)))) 70+ 'true (: io fwrite '"ok: ~w.\n" (list v1)))) 71 72 (defun echo (x) 73- (: lfe_io fwrite '"(eval ~w); " (list x)) 74+ (: io fwrite '"(eval ~w); " (list x)) 75 x) 76 77 ;; Call this function to turn off constant propagation. 78diff --git a/test/guard_SUITE.lfe b/test/lfe_guard_SUITE.lfe 79similarity index 99% 80rename from test/guard_SUITE.lfe 81rename to test/lfe_guard_SUITE.lfe 82index 33b1344..2eeb1a6 100644 83--- a/test/guard_SUITE.lfe 84+++ b/test/lfe_guard_SUITE.lfe 85@@ -26,7 +26,7 @@ 86 87 (include-file "test_server.lfe") 88 89-(defmodule guard_SUITE 90+(defmodule lfe_guard_SUITE 91 (export (all 0) (suite 0) (groups 0) (init_per_suite 1) (end_per_suite 1) 92 (init_per_group 2) (end_per_group 2) 93 (misc 1) (const_cond 1) (basic_not 1) (complex_not 1) (nested_nots 1) 94@@ -42,7 +42,7 @@ 95 (check_qlc_hrl 1) (andalso_semi 1) (t_tuple_size 1) (binary_part 1) 96 )) 97 98-(defmacro MODULE () `'guard_SUITE) 99+(defmacro MODULE () `'lfe_guard_SUITE) 100 101 (defun all () 102 ;; (: test_lib recompile (MODULE)) 103@@ -764,9 +764,9 @@ 104 105 (defun is_function_2 106 ([config] (when (is_list config)) 107- (line (test-pat 'true (is_function (id (function guard_SUITE all 1)) 1))) 108+ (line (test-pat 'true (is_function (id (function lfe_guard_SUITE all 1)) 1))) 109 (line (test-pat 'true (is_function (id (lambda () 'ok)) 0))) 110- (line (test-pat 'false (is_function (id (function guard_SUITE all 1)) 0))) 111+ (line (test-pat 'false (is_function (id (function lfe_guard_SUITE all 1)) 0))) 112 (line (test-pat 'false (is_function (id (lambda () 'ok)) 1))) 113 114 (let ((F (lambda (_) 'ok))) 115-- 1162.7.4 (Apple Git-66) 117 118