aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--helper.c6
-rw-r--r--libasm_test.h6
-rw-r--r--prettier.py6
3 files changed, 9 insertions, 9 deletions
diff --git a/helper.c b/helper.c
index 06781b1..d30adda 100644
--- a/helper.c
+++ b/helper.c
@@ -6,7 +6,7 @@
/* By: cacharle <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2020/02/08 03:07:07 by cacharle #+# #+# */
-/* Updated: 2020/04/13 15:01:20 by charles ### ########.fr */
+/* Updated: 2020/12/09 12:52:33 by charles ### ########.fr */
/* */
/* ************************************************************************** */
@@ -18,8 +18,8 @@ void print_ok(void)
fflush(stdout);
}
-void print_signaled_ko(void)
+void print_signaled_ko(const char *code)
{
- printf("KO: [SEGFAULT]: %s\n", test_name);
+ printf("KO: [SEGFAULT]: %s: with: %s\n", test_name, code);
fflush(stdout);
}
diff --git a/libasm_test.h b/libasm_test.h
index afbc959..6218586 100644
--- a/libasm_test.h
+++ b/libasm_test.h
@@ -6,7 +6,7 @@
/* By: cacharle <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2020/02/08 03:07:19 by cacharle #+# #+# */
-/* Updated: 2020/11/07 17:13:23 by charles ### ########.fr */
+/* Updated: 2020/12/09 12:53:01 by charles ### ########.fr */
/* */
/* ************************************************************************** */
@@ -80,7 +80,7 @@ void ft_list_remove_if_test(void);
* helpers
*/
void print_ok(void);
-void print_signaled_ko(void);
+void print_signaled_ko(const char *code);
# ifdef LIBASM_TEST_BONUS
int* create_data_elem(int data);
@@ -129,7 +129,7 @@ extern char *test_name;
# define TEST_ASM_FUNCTION(x) do { \
TEST_SEGFAULT(x); \
if (signaled) \
- print_signaled_ko(); \
+ print_signaled_ko(#x); \
else \
print_ok(); \
} while(0)
diff --git a/prettier.py b/prettier.py
index 1833a71..04bb04c 100644
--- a/prettier.py
+++ b/prettier.py
@@ -6,7 +6,7 @@
# By: cacharle <marvin@42.fr> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2020/02/05 23:04:13 by cacharle #+# #+# #
-# Updated: 2020/05/04 14:44:44 by charles ### ########.fr #
+# Updated: 2020/12/09 12:56:07 by charles ### ########.fr #
# #
# **************************************************************************** #
@@ -45,7 +45,7 @@ def parse():
continue
m = None
if line.find("SEGFAULT") != -1:
- name = line[4:]
+ name = line[4:line.find("with")]
else:
m = re.search("^KO: \[COMPARE\]: (.*): expected: (.*) got: (.*)( with: .*)?$", line)
if m is None:
@@ -65,7 +65,7 @@ def parse():
"type": "SEGFAULT",
"expected": None,
"actual": None,
- "with": None
+ "with": line[line.find("with:") + len("with:"):]
})
else:
l["ko_info"].append({