llvm/llvm/unittests/AsmParser/AsmParserTest.cpp

//===- llvm/unittest/AsmParser/AsmParserTest.cpp - asm parser unittests ---===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#include "llvm/ADT/StringRef.h"
#include "llvm/AsmParser/Parser.h"
#include "llvm/AsmParser/SlotMapping.h"
#include "llvm/IR/Constants.h"
#include "llvm/IR/DataLayout.h"
#include "llvm/IR/DebugInfoMetadata.h"
#include "llvm/IR/LLVMContext.h"
#include "llvm/IR/Module.h"
#include "llvm/Support/Error.h"
#include "llvm/Support/SourceMgr.h"
#include "gtest/gtest.h"

usingnamespacellvm;

namespace {

TEST(AsmParserTest, NullTerminatedInput) {}

#ifdef GTEST_HAS_DEATH_TEST
#ifndef NDEBUG

TEST(AsmParserTest, NonNullTerminatedInput) {
  LLVMContext Ctx;
  StringRef Source = "; Empty module \n\1\2";
  SMDiagnostic Error;
  std::unique_ptr<Module> Mod;
  EXPECT_DEATH(Mod = parseAssemblyString(Source.substr(0, Source.size() - 2),
                                         Error, Ctx),
               "Buffer is not null terminated!");
}

#endif
#endif

TEST(AsmParserTest, SlotMappingTest) {}

TEST(AsmParserTest, TypeAndConstantValueParsing) {}

TEST(AsmParserTest, TypeAndConstantValueWithSlotMappingParsing) {}

TEST(AsmParserTest, TypeWithSlotMappingParsing) {}

TEST(AsmParserTest, TypeAtBeginningWithSlotMappingParsing) {}

TEST(AsmParserTest, InvalidDataLayoutStringCallback) {}

TEST(AsmParserTest, DIExpressionBodyAtBeginningWithSlotMappingParsing) {}

} // end anonymous namespace