aboutsummaryrefslogtreecommitdiffgithub
diff options
context:
space:
mode:
authorAustin Adams <git@austinjadams.com>2018-09-06 22:25:09 -0400
committerAustin Adams <git@austinjadams.com>2018-09-06 22:25:09 -0400
commite85b204e9efe4022e1ee75b012861eebfe58990f (patch)
treebb2c0ceccca95e1dd5e940138eedc63b2a171e12
parent1bdecf1a45f2a5ffa68a254106b9cfe12bce9e8e (diff)
downloadcircuitsim-grader-template-e85b204e9efe4022e1ee75b012861eebfe58990f.tar.gz
circuitsim-grader-template-e85b204e9efe4022e1ee75b012861eebfe58990f.tar.xz
whitelist: Automatically allow text, probes
-rw-r--r--README.md2
-rw-r--r--src/main/java/edu/gatech/cs2110/circuitsim/api/SubcircuitTest.java12
-rw-r--r--src/main/java/edu/gatech/cs2110/circuitsim/extension/CircuitSimExtension.java2
3 files changed, 9 insertions, 7 deletions
diff --git a/README.md b/README.md
index cfd8e13..fc30fef 100644
--- a/README.md
+++ b/README.md
@@ -174,7 +174,7 @@ You can write either components or component categories, like "Wiring."
There is also a complementary but mutually exclusive flag,
`whitelistedComponents`, which sets the only components allowed. To
avoid code duplication, it allows Input Pins, Output Pins, Constants,
-and Tunnels automatically. But I would go ahead and write
+Tunnels, Probes, and Text automatically. But I would go ahead and write
`whitelistedComponents={"Wiring"}` so they can use probes, for example.
#### Testing sequential logic
diff --git a/src/main/java/edu/gatech/cs2110/circuitsim/api/SubcircuitTest.java b/src/main/java/edu/gatech/cs2110/circuitsim/api/SubcircuitTest.java
index 7fa24eb..7497b4e 100644
--- a/src/main/java/edu/gatech/cs2110/circuitsim/api/SubcircuitTest.java
+++ b/src/main/java/edu/gatech/cs2110/circuitsim/api/SubcircuitTest.java
@@ -43,12 +43,12 @@ public @interface SubcircuitTest {
* these components or categories.
* Mutually exclusive with {@link #blacklistedComponents()}.
* <p>
- * Automatically includes Input Pins, Output Pins, Constants, and
- * Tunnels. always allowed. But other components will be allowed
- * only if you specify them here, including other Wiring components.
- * Please consider starting off with {@code
- * whitelistedComponents={"Wiring"}}, or you will risk frustrating
- * students.
+ * Automatically includes Input Pins, Output Pins, Constants,
+ * Tunnels, Probes, and Text. But other components will be allowed only if
+ * you specify them here, including other Wiring components. Please
+ * consider starting off with {@code
+ * whitelistedComponents={"Wiring", "Text"}}, or you will risk
+ * frustrating students.
*
* @return list of required component names or component category names
*/
diff --git a/src/main/java/edu/gatech/cs2110/circuitsim/extension/CircuitSimExtension.java b/src/main/java/edu/gatech/cs2110/circuitsim/extension/CircuitSimExtension.java
index 714d037..f507769 100644
--- a/src/main/java/edu/gatech/cs2110/circuitsim/extension/CircuitSimExtension.java
+++ b/src/main/java/edu/gatech/cs2110/circuitsim/extension/CircuitSimExtension.java
@@ -89,6 +89,8 @@ public class CircuitSimExtension implements Extension, BeforeAllCallback, Before
restrictedComponents.add("Output Pin");
restrictedComponents.add("Constant");
restrictedComponents.add("Tunnel");
+ restrictedComponents.add("Text");
+ restrictedComponents.add("Probe");
}
Set<String> violatingComponentNames =