#include "clang/Basic/Sarif.h"
#include "clang/Basic/DiagnosticOptions.h"
#include "clang/Basic/FileManager.h"
#include "clang/Basic/FileSystemOptions.h"
#include "clang/Basic/LangOptions.h"
#include "clang/Basic/SourceLocation.h"
#include "clang/Basic/SourceManager.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/Support/FormatVariadic.h"
#include "llvm/Support/JSON.h"
#include "llvm/Support/MemoryBuffer.h"
#include "llvm/Support/VirtualFileSystem.h"
#include "llvm/Support/raw_ostream.h"
#include "gmock/gmock.h"
#include "gtest/gtest.h"
#include <algorithm>
usingnamespaceclang;
namespace {
LineCol;
static std::string serializeSarifDocument(llvm::json::Object &&Doc) { … }
class SarifDocumentWriterTest : public ::testing::Test { … };
TEST_F(SarifDocumentWriterTest, canCreateEmptyDocument) { … }
TEST_F(SarifDocumentWriterTest, canCreateDocumentWithOneRun) { … }
TEST_F(SarifDocumentWriterTest, addingResultsWillCrashIfThereIsNoRun) { … }
TEST_F(SarifDocumentWriterTest, settingInvalidRankWillCrash) { … }
TEST_F(SarifDocumentWriterTest, creatingResultWithDisabledRuleWillCrash) { … }
TEST_F(SarifDocumentWriterTest, addingResultWithValidRuleAndRunIsOk) { … }
TEST_F(SarifDocumentWriterTest, checkSerializingResultsWithDefaultRuleConfig) { … }
TEST_F(SarifDocumentWriterTest, checkSerializingResultsWithCustomRuleConfig) { … }
TEST_F(SarifDocumentWriterTest, checkSerializingArtifacts) { … }
TEST_F(SarifDocumentWriterTest, checkSerializingCodeflows) { … }
}