-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathComments+Percent.swift
More file actions
35 lines (27 loc) · 1.21 KB
/
Comments+Percent.swift
File metadata and controls
35 lines (27 loc) · 1.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
//=----------------------------------------------------------------------------=
// This source file is part of the DiffableTextViews open source project.
//
// Copyright (c) 2022 Oscar Byström Ericsson
// Licensed under Apache License, Version 2.0
//
// See http://www.apache.org/licenses/LICENSE-2.0 for license information.
//=----------------------------------------------------------------------------=
#if DEBUG
@testable import DiffableTextKitXNumber
import XCTest
//*============================================================================*
// MARK: * Comments x Percent
//*============================================================================*
final class CommentsOnPercent: XCTestCase {
//=------------------------------------------------------------------------=
// MARK: Tests
//=------------------------------------------------------------------------=
func testPercentLabelsAreAlwaysVirtual() {
for cache in numbers {
let components = cache.interpreter.components
let percent = IntegerFormatStyle<Int>.Percent(locale:cache.style.locale)
XCTAssertEqual(1, percent.format(0).filter(components.nonvirtual).count)
}
}
}
#endif