File tree Expand file tree Collapse file tree 2 files changed +48
-0
lines changed
Tests/SwiftMemcacheTests/UnitTest Expand file tree Collapse file tree 2 files changed +48
-0
lines changed Original file line number Diff line number Diff line change
1
+ //===----------------------------------------------------------------------===//
2
+ //
3
+ // This source file is part of the swift-memcache-gsoc open source project
4
+ //
5
+ // Copyright (c) 2023 Apple Inc. and the swift-memcache-gsoc project authors
6
+ // Licensed under Apache License v2.0
7
+ //
8
+ // See LICENSE.txt for license information
9
+ // See CONTRIBUTORS.txt for the list of swift-memcache-gsoc project authors
10
+ //
11
+ // SPDX-License-Identifier: Apache-2.0
12
+ //
13
+ //===----------------------------------------------------------------------===//
14
+
15
+ enum MemcachedFlag {
16
+ /// v: return item value in <data block>
17
+ case v
18
+
19
+ var bytes : UInt8 {
20
+ switch self {
21
+ case . v:
22
+ return 0x76
23
+ }
24
+ }
25
+ }
Original file line number Diff line number Diff line change
1
+ //===----------------------------------------------------------------------===//
2
+ //
3
+ // This source file is part of the swift-memcache-gsoc open source project
4
+ //
5
+ // Copyright (c) 2023 Apple Inc. and the swift-memcache-gsoc project authors
6
+ // Licensed under Apache License v2.0
7
+ //
8
+ // See LICENSE.txt for license information
9
+ // See CONTRIBUTORS.txt for the list of swift-memcache-gsoc project authors
10
+ //
11
+ // SPDX-License-Identifier: Apache-2.0
12
+ //
13
+ //===----------------------------------------------------------------------===//
14
+
15
+ @testable import SwiftMemcache
16
+ import XCTest
17
+
18
+ final class MemcachedFlagTests : XCTestCase {
19
+ func testVFlagBytes( ) {
20
+ let flag = MemcachedFlag . v
21
+ XCTAssertEqual ( flag. bytes, 0x76 )
22
+ }
23
+ }
You can’t perform that action at this time.
0 commit comments