Skip to content

Commit

Permalink
Fixed sync issue
Browse files Browse the repository at this point in the history
  • Loading branch information
dirkriehle committed Nov 18, 2024
1 parent c17def4 commit d9138b3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/adap-b04/files/RootNode.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Name } from "../names-solution/Name";
import { StringName } from "../names-solution/StringName";
import { Name } from "../names/Name";
import { StringName } from "../names/StringName";
import { Directory } from "./Directory";

export class RootNode extends Directory {
Expand Down
10 changes: 5 additions & 5 deletions test/adap-b01/names/Name.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,32 +4,32 @@ import { Name } from "../../../src/adap-b01/names/Name";
describe("Basic initialization tests", () => {
it("test construction 1", () => {
let n: Name = new Name(["oss", "cs", "fau", "de"]);
expect(n.asNameString()).toBe("oss.cs.fau.de");
expect(n.asString()).toBe("oss.cs.fau.de");
});
});

describe("Basic function tests", () => {
it("test insert", () => {
let n: Name = new Name(["oss", "fau", "de"]);
n.insert(1, "cs");
expect(n.asNameString()).toBe("oss.cs.fau.de");
expect(n.asString()).toBe("oss.cs.fau.de");
});
});

describe("Delimiter function tests", () => {
it("test insert", () => {
let n: Name = new Name(["oss", "fau", "de"], '#');
n.insert(1, "cs");
expect(n.asNameString()).toBe("oss#cs#fau#de");
expect(n.asString()).toBe("oss#cs#fau#de");
});
});

describe("Escape character extravaganza", () => {
it("test escape and delimiter boundary conditions", () => {
// Original name string = "oss.cs.fau.de"
let n: Name = new Name(["oss.cs.fau.de"], '#');
expect(n.asNameString()).toBe("oss.cs.fau.de");
expect(n.asString()).toBe("oss.cs.fau.de");
n.append("people");
expect(n.asNameString()).toBe("oss.cs.fau.de#people");
expect(n.asString()).toBe("oss.cs.fau.de#people");
});
});

0 comments on commit d9138b3

Please sign in to comment.