From 2c85647fa298d6d15db6d3f89a3b919c02902eb8 Mon Sep 17 00:00:00 2001
From: Matthew Owens <matthew@owens.tech>
Date: Tue, 21 Dec 2021 20:44:23 +0000
Subject: [PATCH] initilised repo

---
 .gitignore             |  2 +-
 README.md              | 10 +---------
 check_priority_queue.c | 31 +++++++++++++++++++++++++++++++
 check_priority_queue.h |  3 +++
 check_template.c       | 31 -------------------------------
 check_template.h       |  3 ---
 init_tests.sh          | 35 -----------------------------------
 main.c                 |  4 ++--
 8 files changed, 38 insertions(+), 81 deletions(-)
 create mode 100644 check_priority_queue.c
 create mode 100644 check_priority_queue.h
 delete mode 100644 check_template.c
 delete mode 100644 check_template.h
 delete mode 100755 init_tests.sh

diff --git a/.gitignore b/.gitignore
index 3326609..114650f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -28,7 +28,7 @@
 *.out
 *.app
 check
-template
+priority-queue
 
 # Libraries
 *.a
diff --git a/README.md b/README.md
index 9414afc..f43b7e5 100644
--- a/README.md
+++ b/README.md
@@ -1,9 +1 @@
-# test-template
-
-template repo for quickly creating testable modules
-
-## usage
-* create a new repo with [generate](https://github.com/AbyssalThistle/test-template/generate)
-* add the new repo as a git submodule into your codebase
-* navigate to the submodule directory and run `./init_tests $module` where
-`$module` is the name of your cecse module, this should match your include headers.
+# test-priority-queue
diff --git a/check_priority_queue.c b/check_priority_queue.c
new file mode 100644
index 0000000..4876292
--- /dev/null
+++ b/check_priority_queue.c
@@ -0,0 +1,31 @@
+#include "check_priority_queue.h"
+#include "priority_queue.h"
+#include <check.h>
+
+static void setup()
+{
+}
+
+static void teardown()
+{
+}
+
+START_TEST(test_priority_queue)
+{
+}
+END_TEST
+
+Suite *priority_queue_suite(void)
+{
+	Suite *s;
+	TCase *tc;
+
+	s = suite_create("priority_queue suite");
+	tc = tcase_create("priority_queue");
+
+	tcase_add_unchecked_fixture(tc, setup, teardown);
+	tcase_add_test(tc, test_priority_queue);
+
+	suite_add_tcase(s, tc);
+	return s;
+}
diff --git a/check_priority_queue.h b/check_priority_queue.h
new file mode 100644
index 0000000..d4abc23
--- /dev/null
+++ b/check_priority_queue.h
@@ -0,0 +1,3 @@
+#pragma once
+#include <check.h>
+Suite * priority_queue_suite(void);
diff --git a/check_template.c b/check_template.c
deleted file mode 100644
index ba53e23..0000000
--- a/check_template.c
+++ /dev/null
@@ -1,31 +0,0 @@
-#include "check_template.h"
-#include "template.h"
-#include <check.h>
-
-static void setup()
-{
-}
-
-static void teardown()
-{
-}
-
-START_TEST(test_template)
-{
-}
-END_TEST
-
-Suite *template_suite(void)
-{
-	Suite *s;
-	TCase *tc;
-
-	s = suite_create("template suite");
-	tc = tcase_create("template");
-
-	tcase_add_unchecked_fixture(tc, setup, teardown);
-	tcase_add_test(tc, test_template);
-
-	suite_add_tcase(s, tc);
-	return s;
-}
diff --git a/check_template.h b/check_template.h
deleted file mode 100644
index 23ad748..0000000
--- a/check_template.h
+++ /dev/null
@@ -1,3 +0,0 @@
-#pragma once
-#include <check.h>
-Suite * template_suite(void);
diff --git a/init_tests.sh b/init_tests.sh
deleted file mode 100755
index b0a23bc..0000000
--- a/init_tests.sh
+++ /dev/null
@@ -1,35 +0,0 @@
-#!/bin/bash
-
-function error()
-{
-	echo "provide a name"
-	exit 1
-}
-
-function init()
-{
-	echo "renaming template file & lines to $1"
-	upper=$(echo $1 | tr '[:lower:]' '[:upper:]')
-	under=$(echo $1 | tr '-' '_')
-	dashes=$(echo $1 | tr '_' '-')
-
-	mv check_template.h check_$under.h
-	mv check_template.c check_$under.c
-	find . -type f -name '*.[c|h]' -exec sed -i "s/template/$under/g" {} +
-	sed -i "s/template/$dashes/g" .gitignore
-	sed -i "s/TEMPLATE/$upper/g" module.mk
-
-	# clearing README
-	echo "# test-$dashes" > README.md
-}
-
-# do we have a name parameter?
-[ $# -eq 1 ] && init $1 || error
-rm -- "$0"
-
-# clearing up source control
-git rm check_template.c check_template.h $0
-git add check_$under.c check_$under.h README.md .gitignore main.c
-
-git commit -m "initilised repo"
-git push
diff --git a/main.c b/main.c
index 72cc307..675dab6 100644
--- a/main.c
+++ b/main.c
@@ -1,9 +1,9 @@
 #include "runner.h"
-#include "check_template.h"
+#include "check_priority_queue.h"
 #include <stdlib.h>
 
 int main()
 {
-	int failed_count = run_suite_forkless(template_suite());
+	int failed_count = run_suite_forkless(priority_queue_suite());
 	return (failed_count == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
 }
-- 
2.20.1