From 8873837e6f3e552c3c7093412fec14cea0a88169 Mon Sep 17 00:00:00 2001 From: Jarek Kadecki Date: Fri, 17 Dec 2021 00:11:39 +0100 Subject: [PATCH 1/3] =?UTF-8?q?Naprawi=C5=82em=20quickosorta?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- quicksort.pl | 1 + tests.pl | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/quicksort.pl b/quicksort.pl index c18564e..1ed30fe 100644 --- a/quicksort.pl +++ b/quicksort.pl @@ -1,6 +1,7 @@ % Implementacja Quicksorta w Prologu % Autor korpo, https://github.com/korpo +project_dedalus_quicksort([],[]). project_dedalus_quicksort([X],[X]). project_dedalus_quicksort([X|Xs],Ys) :- project_dedalus_quicksort_helper_partition(Xs,X,Left,Right), diff --git a/tests.pl b/tests.pl index fbaf4d2..62c42ab 100644 --- a/tests.pl +++ b/tests.pl @@ -7,7 +7,7 @@ sort(L, Sorted). test(quicksort,[nondet]) :- - L=[8,4,2,1,3,6,5,7,12,10,9,11,14,13,15], + randseq(15,15,L), project_dedalus_quicksort(L, Sorted), sort(L, Sorted). From b7bd8e6ede23bd31c9eb3dc111232ee9996f2992 Mon Sep 17 00:00:00 2001 From: Jarek Kadecki Date: Fri, 17 Dec 2021 00:26:34 +0100 Subject: [PATCH 2/3] =?UTF-8?q?Naprawiono=20quicksorta=20roaz=20b=C5=82?= =?UTF-8?q?=C4=99dy=20z=20nieprzechodz=C4=85cymi=20testami?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests.pl b/tests.pl index 62c42ab..61f5e69 100644 --- a/tests.pl +++ b/tests.pl @@ -6,7 +6,7 @@ project_dedalus_quicksort(L, Sorted), sort(L, Sorted). -test(quicksort,[nondet]) :- +test(project_dedalus_quicksort,[nondet]) :- randseq(15,15,L), project_dedalus_quicksort(L, Sorted), sort(L, Sorted). From ac1986a945dd603892862b9bf38eefbfa1b070b0 Mon Sep 17 00:00:00 2001 From: Jarek Kadecki Date: Fri, 17 Dec 2021 00:26:34 +0100 Subject: [PATCH 3/3] =?UTF-8?q?Naprawiono=20quicksorta=20oraz=20b=C5=82?= =?UTF-8?q?=C4=99dy=20z=20nieprzechodz=C4=85cymi=20testami?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests.pl b/tests.pl index 62c42ab..61f5e69 100644 --- a/tests.pl +++ b/tests.pl @@ -6,7 +6,7 @@ project_dedalus_quicksort(L, Sorted), sort(L, Sorted). -test(quicksort,[nondet]) :- +test(project_dedalus_quicksort,[nondet]) :- randseq(15,15,L), project_dedalus_quicksort(L, Sorted), sort(L, Sorted).