Skip to content

Commit

Permalink
Test names with dots (plus minor fixes)
Browse files Browse the repository at this point in the history
  • Loading branch information
prdoyle committed Sep 7, 2024
1 parent c51d07d commit cf343a4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion bosk-core/src/main/java/works/bosk/Bosk.java
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ public class Bosk<R extends StateTreeNode> implements BoskInfo<R> {
*
* @see DriverStack
*/
@SuppressWarnings("this-escape")
public Bosk(String name, Type rootType, DefaultRootFunction<R> defaultRootFunction, DriverFactory<R> driverFactory) {
this.name = name;
this.localDriver = new LocalDriver(defaultRootFunction);
Expand Down Expand Up @@ -136,7 +137,7 @@ public Bosk(String name, Type rootType, DefaultRootFunction<R> defaultRootFuncti
rawClass(rootType).cast(this.currentRoot);

// Ok, we're done initializing
boskInfo.boskRef().set(this);
boskInfo.boskRef().set(this); // @SuppressWarnings("this-escape")
}

public interface DefaultRootFunction<RR extends StateTreeNode> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ void mapValue_works() throws InvalidTypeException {
MapValue<String> originalMapValue = MapValue.fromFunction(asList("key.with.dots.1", "key.with.dots.2"), k -> k + "_originalValue");
driver.submitReplacement(mapRef, originalMapValue);
assertCorrectBoskContents();
MapValue<String> newMapValue = originalMapValue.with("key.with.dots.1", "newValue");
MapValue<String> newMapValue = originalMapValue.with("key.with.dots.1", "_newValue");
driver.submitReplacement(mapRef, newMapValue);
assertCorrectBoskContents();

Expand Down Expand Up @@ -527,6 +527,7 @@ static Stream<Identifier> childID() {
"id.with.dots",
"id/with/slashes",
"$id$with$dollars$",
"id:with:colons:",
AWKWARD_ID,
"idWithEmojis\uD83C\uDF33\uD83E\uDDCA"
).map(Identifier::from);
Expand All @@ -535,7 +536,7 @@ static Stream<Identifier> childID() {
/**
* Contains all kinds of special characters
*/
public static final String AWKWARD_ID = "$id.with%everything/ +\uD83D\uDE09";
public static final String AWKWARD_ID = "$id.with%everything:/ +\uD83D\uDE09";

@SuppressWarnings("unused")
static Stream<String> testEntityField() {
Expand Down

0 comments on commit cf343a4

Please sign in to comment.