Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
// See https://swift.org/CONTRIBUTORS.txt for Swift project authors
//

private import _TestingInternals

extension Event {
/// A type which handles ``Event`` instances and outputs representations of
/// them as human-readable messages.
Expand Down Expand Up @@ -356,6 +358,7 @@ extension Event.HumanReadableOutputRecorder {

case .runStarted:
var comments = [Comment]()
comments.append("Clang Major: \(clangMajor())")
if verbosity > 0 {
if let swiftStandardLibraryVersion {
comments.append("Swift Standard Library Version: \(swiftStandardLibraryVersion)")
Expand Down
4 changes: 4 additions & 0 deletions Sources/_TestingInternals/Versions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@
#include <algorithm>
#include <iterator>

int clangMajor(void) {
return __clang_major__;
}

const char *swt_getTestingLibraryVersion(void) {
#if defined(SWT_TESTING_LIBRARY_VERSION)
// The current environment explicitly specifies a version string to return.
Expand Down
2 changes: 2 additions & 0 deletions Sources/_TestingInternals/include/Versions.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ static inline uint64_t swt_getSwiftCompilerVersion(void) {
#endif
}

SWT_EXTERN int clangMajor(void);

/// Get the human-readable version of the testing library.
///
/// - Returns: A human-readable string describing the version of the testing
Expand Down