Skip to content

Commit

Permalink
[SS-000] LockedDictionary valuse, keys 생성 테스트코드 작성
Browse files Browse the repository at this point in the history
  • Loading branch information
J0onYEong committed Nov 1, 2024
1 parent 7941f7e commit 6ecad4c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
Binary file not shown.
11 changes: 11 additions & 0 deletions Tests/SwiftStructuresTests/ThreadSafeDictionaryTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,17 @@ import XCTest
@testable import SwiftStructures

final class ThreadSafeDictionary: XCTestCase {

func keysValuesTest() {
let dictionary = LockedDictionary<Int, String>()

for index in 0..<100 {
dictionary[index] = ""
}

XCTAssertTrue(dictionary.keys.count == 100)
XCTAssertTrue(dictionary.values.count == 100)
}

func testThreadSaftyForLockedDictionary() {
let dictionary = LockedDictionary<Int, String>()
Expand Down

0 comments on commit 6ecad4c

Please sign in to comment.