(t *testing.T)
| 36 | } |
| 37 | |
| 38 | func Test_findPath_RoomNotFound(t *testing.T) { |
| 39 | m := NewMapper(1) |
| 40 | m.crawledRooms = map[int]*mapNode{ |
| 41 | 1: {RoomId: 1, Pos: positionDelta{}, Exits: map[string]nodeExit{}}, |
| 42 | } |
| 43 | |
| 44 | _, err := m.findPath(1, 2) |
| 45 | assert.ErrorIs(t, err, ErrRoomNotFound, "expected ErrRoomNotFound for missing dest") |
| 46 | |
| 47 | _, err = m.findPath(2, 1) |
| 48 | assert.ErrorIs(t, err, ErrRoomNotFound, "expected ErrRoomNotFound for missing source") |
| 49 | } |
| 50 | |
| 51 | func Test_findPath_Simple(t *testing.T) { |
| 52 | m := buildTestMapper() |