summaryrefslogtreecommitdiff
path: root/deps/Unity/extras/bdd/src
diff options
context:
space:
mode:
authorOmniscient <17525998+omnisci3nce@users.noreply.github.com>2024-02-24 22:47:46 +1100
committerOmniscient <17525998+omnisci3nce@users.noreply.github.com>2024-02-24 22:47:46 +1100
commit7b3afcaf77f96e7d62f6cd1623ead7f17512d79f (patch)
treeb5f82c64e9c06a84e4d095ab4ac48712e860b673 /deps/Unity/extras/bdd/src
parentb047be5252aeb981faea077409c1768fda0301d9 (diff)
repo init. partial port of existing code
Diffstat (limited to 'deps/Unity/extras/bdd/src')
-rw-r--r--deps/Unity/extras/bdd/src/unity_bdd.h44
1 files changed, 44 insertions, 0 deletions
diff --git a/deps/Unity/extras/bdd/src/unity_bdd.h b/deps/Unity/extras/bdd/src/unity_bdd.h
new file mode 100644
index 0000000..d91b3f1
--- /dev/null
+++ b/deps/Unity/extras/bdd/src/unity_bdd.h
@@ -0,0 +1,44 @@
+/* Copyright (c) 2023 Michael Gene Brockus (Dreamer) and Contributed to Unity Project
+ * ==========================================
+ * Unity Project - A Test Framework for C
+ * Copyright (c) 2007 Mike Karlesky, Mark VanderVoord, Greg Williams
+ * [Released under MIT License. Please refer to license.txt for details]
+ * ========================================== */
+
+#ifndef UNITY_BDD_TEST_H_
+#define UNITY_BDD_TEST_H_
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+#include <stdio.h>
+
+/**
+ * @brief Macros for defining a Behavior-Driven Development (BDD) structure with descriptions.
+ *
+ * These macros provide a way to structure and describe different phases (Given, When, Then) of a
+ * test scenario in a BDD-style format. However, they don't have functional behavior by themselves
+ * and are used for descriptive purposes.
+ */
+#define GIVEN(description) \
+ if (0) { \
+ printf("Given %s\n", description); \
+ } else
+
+#define WHEN(description) \
+ if (0) { \
+ printf("When %s\n", description); \
+ } else
+
+#define THEN(description) \
+ if (0) { \
+ printf("Then %s\n", description); \
+ } else
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif