Skip to content

Commit ab7c550

Browse files
authored
Merge pull request #7379 from gottesmm/unittest_gardening
2 parents 671dd20 + e678f49 commit ab7c550

22 files changed

+415
-237
lines changed

include/swift/Basic/DiverseStack.h

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,14 @@
99
// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
1010
//
1111
//===----------------------------------------------------------------------===//
12-
//
13-
// This file defines a data structure for representing a stack of
14-
// variably-sized objects. It is a requirement that the object type
15-
// be trivially movable, meaning that it has a trivial move
16-
// constructor and a trivial destructor.
17-
//
12+
///
13+
/// \file
14+
///
15+
/// This file defines a data structure for representing a stack of
16+
/// variably-sized objects. It is a requirement that the object type
17+
/// be trivially movable, meaning that it has a trivial move
18+
/// constructor and a trivial destructor.
19+
///
1820
//===----------------------------------------------------------------------===//
1921

2022
#ifndef SWIFT_BASIC_DIVERSESTACK_H

unittests/Basic/ADTTests.cpp

Lines changed: 0 additions & 194 deletions
This file was deleted.

unittests/Basic/CMakeLists.txt

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,23 +6,25 @@ handle_gyb_sources(
66
${SWIFT_HOST_VARIANT_ARCH})
77

88
add_swift_unittest(SwiftBasicTests
9-
ADTTests.cpp
109
BlotMapVectorTest.cpp
1110
ClusteredBitVectorTest.cpp
12-
Demangle.cpp
11+
DemangleTest.cpp
1312
EditorPlaceholderTest.cpp
1413
EncodedSequenceTest.cpp
15-
FileSystemTests.cpp
16-
ImmutablePointerSetTests.cpp
14+
FileSystemTest.cpp
15+
ImmutablePointerSetTest.cpp
16+
OptionSetTest.cpp
1717
PointerIntEnumTest.cpp
1818
PrefixMapTest.cpp
19-
SourceManager.cpp
19+
RangeTest.cpp
20+
SourceManagerTest.cpp
2021
StringExtrasTest.cpp
2122
SuccessorMapTest.cpp
22-
ThreadSafeRefCntPointerTests.cpp
23-
TransformArrayRef.cpp
24-
TreeScopedHashTableTests.cpp
25-
Unicode.cpp
23+
ThreadSafeRefCntPointerTest.cpp
24+
TransformArrayRefTest.cpp
25+
TreeScopedHashTableTest.cpp
26+
UnicodeTest.cpp
27+
ValueEnumeratorTest.cpp
2628
${generated_tests}
2729
)
2830

unittests/Basic/Demangle.cpp

Lines changed: 0 additions & 13 deletions
This file was deleted.

unittests/Basic/DemangleTest.cpp

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
//===--- DemangleTest.cpp -------------------------------------------------===//
2+
//
3+
// This source file is part of the Swift.org open source project
4+
//
5+
// Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors
6+
// Licensed under Apache License v2.0 with Runtime Library Exception
7+
//
8+
// See https://swift.org/LICENSE.txt for license information
9+
// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
10+
//
11+
//===----------------------------------------------------------------------===//
12+
13+
#include "swift/Basic/DemangleWrappers.h"
14+
#include "gtest/gtest.h"
15+
16+
using namespace swift::demangle_wrappers;
17+
18+
TEST(Demangle, DemangleWrappers) {
19+
EXPECT_EQ("", demangleSymbolAsString(""));
20+
std::string MangledName = "_TtV1a1b\\\t\n\r\"\'\x1f\x20\x7e\x7f";
21+
MangledName += '\0';
22+
EXPECT_EQ("a.b with unmangled suffix \"\\\\\\t\\n\\r\\\"'\\x1F ~\\x7F\\0\"",
23+
demangleSymbolAsString(MangledName));
24+
}
25+

unittests/Basic/EditorPlaceholderTest.cpp

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
//===--- EditorPlaceholderTest.cpp ----------------------------------------===//
2+
//
3+
// This source file is part of the Swift.org open source project
4+
//
5+
// Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors
6+
// Licensed under Apache License v2.0 with Runtime Library Exception
7+
//
8+
// See https://swift.org/LICENSE.txt for license information
9+
// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
10+
//
11+
//===----------------------------------------------------------------------===//
12+
113
#include "swift/Basic/EditorPlaceholder.h"
214
#include "llvm/ADT/Optional.h"
315
#include "gtest/gtest.h"

unittests/Basic/EncodedSequenceTest.cpp

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
//===--- EncodedSequenceTest.cpp ------------------------------------------===//
2+
//
3+
// This source file is part of the Swift.org open source project
4+
//
5+
// Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors
6+
// Licensed under Apache License v2.0 with Runtime Library Exception
7+
//
8+
// See https://swift.org/LICENSE.txt for license information
9+
// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
10+
//
11+
//===----------------------------------------------------------------------===//
12+
113
#include "swift/Basic/EncodedSequence.h"
214
#include "gtest/gtest.h"
315

unittests/Basic/ImmutablePointerSetTests.cpp renamed to unittests/Basic/ImmutablePointerSetTest.cpp

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
//===--- ImmutablePointerSetTest.cpp --------------------------------------===//
2+
//
3+
// This source file is part of the Swift.org open source project
4+
//
5+
// Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors
6+
// Licensed under Apache License v2.0 with Runtime Library Exception
7+
//
8+
// See https://swift.org/LICENSE.txt for license information
9+
// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
10+
//
11+
//===----------------------------------------------------------------------===//
12+
113
#include "swift/Basic/ImmutablePointerSet.h"
214
#include "llvm/ADT/ArrayRef.h"
315
#include "llvm/Support/Allocator.h"

0 commit comments

Comments
 (0)