Move NPC occurrences to their canonical namespace
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
// Package npcinteractions encodes durable D&D NPC occurrence artifacts.
|
||||
package npcinteractions
|
||||
// Package npcoccurrences encodes durable D&D NPC occurrence artifacts.
|
||||
package npcoccurrences
|
||||
|
||||
import (
|
||||
"embed"
|
||||
@@ -1,4 +1,4 @@
|
||||
package npcinteractions
|
||||
package npcoccurrences
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
@@ -111,7 +111,7 @@ func TestCodecStrictlyRejectsMalformedUnknownAndTrailingJSON(t *testing.T) {
|
||||
for _, test := range []struct{ name, raw, want string }{
|
||||
{"malformed", `{`, "decode dnd npc occurrence list"},
|
||||
{"unknown top-level", `{"occurrences":[],"unexpected":true}`, "unknown field"},
|
||||
{"unknown interaction field", strings.Replace(validJSON, `"kind":"dialogue"`, `"kind":"dialogue","unexpected":true`, 1), "unknown field"},
|
||||
{"unknown occurrence field", strings.Replace(validJSON, `"kind":"dialogue"`, `"kind":"dialogue","unexpected":true`, 1), "unknown field"},
|
||||
{"unknown source reference field", strings.Replace(validJSON, `"end_unit_id":1`, `"end_unit_id":1,"unexpected":true`, 1), "unknown field"},
|
||||
{"trailing", `{"occurrences":[]} {}`, "multiple JSON values"},
|
||||
} {
|
||||
@@ -147,7 +147,7 @@ func TestCodecRejectsRequiredShapeEnumAndReferenceBoundaries(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestCodecAcceptsEveryInteractionKind(t *testing.T) {
|
||||
func TestCodecAcceptsEveryOccurrenceKind(t *testing.T) {
|
||||
for _, kind := range []dnd.NPCOccurrenceKind{
|
||||
dnd.NPCOccurrenceKindMentioned,
|
||||
dnd.NPCOccurrenceKindNoncombatPresence,
|
||||
Reference in New Issue
Block a user