Skip to content

Commit

Permalink
style: added types information to declarations
Browse files Browse the repository at this point in the history
FossilOrigin-Name: dc68a4ca58215840016979e8096cd12c74c6e026aec59219b018b0d0c1eda752
  • Loading branch information
thindil committed May 11, 2024
1 parent de54532 commit c8fe889
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tests/aliases.nim
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ include ../src/aliases
suite "Unit tests for aliases module":

checkpoint "Initializing the tests"
let db = initDb(dbName = "test2.db")
let db: DbConn = initDb(dbName = "test2.db")
var
myaliases = newOrderedTable[string, int]()
commands = newTable[string, CommandData]()
myaliases: ref OrderedTable[string, int] = newOrderedTable[string, int]()
commands: ref Table[string, CommandData] = newTable[string, CommandData]()

checkpoint "Adding testing aliases if needed"
db.addAliases
Expand All @@ -64,7 +64,7 @@ suite "Unit tests for aliases module":
check:
deleteAlias(arguments = "delete 22", aliases = myaliases, db = db) == QuitFailure
checkpoint "Re-adding the test alias"
var testAlias2 = newAlias(name = "tests2", path = "/".Path,
var testAlias2: Alias = newAlias(name = "tests2", path = "/".Path,
recursive = false,
commands = "ls -a", description = "Test alias 2.", output = "output")
db.insert(obj = testAlias2)
Expand Down Expand Up @@ -96,7 +96,7 @@ suite "Unit tests for aliases module":
listAliases(arguments = "werwerew", aliases = myaliases, db = db) == QuitSuccess

test "Initializing an object of Alias type":
let newAlias = newAlias(name = "ala")
let newAlias: Alias = newAlias(name = "ala")
check:
newAlias.name == "ala"

Expand Down

0 comments on commit c8fe889

Please sign in to comment.