2012-11-02 01:52:58 +08:00
|
|
|
//===- unittests/Lex/PPCallbacksTest.cpp - PPCallbacks tests ------===//
|
|
|
|
//
|
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
//
|
|
|
|
// This file is distributed under the University of Illinois Open Source
|
|
|
|
// License. See LICENSE.TXT for details.
|
|
|
|
//
|
|
|
|
//===--------------------------------------------------------------===//
|
|
|
|
|
2012-12-04 17:45:34 +08:00
|
|
|
#include "clang/Lex/Preprocessor.h"
|
2014-01-07 19:51:46 +08:00
|
|
|
#include "clang/AST/ASTConsumer.h"
|
|
|
|
#include "clang/AST/ASTContext.h"
|
2012-11-02 01:52:58 +08:00
|
|
|
#include "clang/Basic/Diagnostic.h"
|
|
|
|
#include "clang/Basic/FileManager.h"
|
|
|
|
#include "clang/Basic/LangOptions.h"
|
|
|
|
#include "clang/Basic/SourceManager.h"
|
|
|
|
#include "clang/Basic/TargetInfo.h"
|
|
|
|
#include "clang/Basic/TargetOptions.h"
|
|
|
|
#include "clang/Lex/HeaderSearch.h"
|
|
|
|
#include "clang/Lex/HeaderSearchOptions.h"
|
|
|
|
#include "clang/Lex/ModuleLoader.h"
|
|
|
|
#include "clang/Lex/PreprocessorOptions.h"
|
2013-10-12 17:29:48 +08:00
|
|
|
#include "clang/Parse/Parser.h"
|
|
|
|
#include "clang/Sema/Sema.h"
|
2012-11-02 01:52:58 +08:00
|
|
|
#include "llvm/ADT/SmallString.h"
|
2013-06-12 06:15:02 +08:00
|
|
|
#include "llvm/Support/Path.h"
|
2012-11-02 01:52:58 +08:00
|
|
|
#include "gtest/gtest.h"
|
|
|
|
|
|
|
|
using namespace llvm;
|
|
|
|
using namespace llvm::sys;
|
|
|
|
using namespace clang;
|
|
|
|
|
|
|
|
namespace {
|
|
|
|
|
|
|
|
// Stub out module loading.
|
|
|
|
class VoidModuleLoader : public ModuleLoader {
|
2014-04-24 03:04:32 +08:00
|
|
|
ModuleLoadResult loadModule(SourceLocation ImportLoc,
|
|
|
|
ModuleIdPath Path,
|
|
|
|
Module::NameVisibilityKind Visibility,
|
|
|
|
bool IsInclusionDirective) override {
|
2012-11-30 08:01:57 +08:00
|
|
|
return ModuleLoadResult();
|
2012-11-02 01:52:58 +08:00
|
|
|
}
|
2013-01-12 10:16:29 +08:00
|
|
|
|
2014-04-24 03:04:32 +08:00
|
|
|
void makeModuleVisible(Module *Mod,
|
|
|
|
Module::NameVisibilityKind Visibility,
|
|
|
|
SourceLocation ImportLoc,
|
|
|
|
bool Complain) override { }
|
2014-04-23 20:57:01 +08:00
|
|
|
|
2014-04-24 03:04:32 +08:00
|
|
|
GlobalModuleIndex *loadGlobalModuleIndex(SourceLocation TriggerLoc) override
|
2014-04-23 20:57:01 +08:00
|
|
|
{ return 0; }
|
2014-04-24 03:04:32 +08:00
|
|
|
bool lookupMissingImports(StringRef Name, SourceLocation TriggerLoc) override
|
|
|
|
{ return 0; };
|
2012-11-02 01:52:58 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
// Stub to collect data from InclusionDirective callbacks.
|
|
|
|
class InclusionDirectiveCallbacks : public PPCallbacks {
|
|
|
|
public:
|
|
|
|
void InclusionDirective(SourceLocation HashLoc,
|
|
|
|
const Token &IncludeTok,
|
|
|
|
StringRef FileName,
|
|
|
|
bool IsAngled,
|
|
|
|
CharSourceRange FilenameRange,
|
|
|
|
const FileEntry *File,
|
|
|
|
StringRef SearchPath,
|
|
|
|
StringRef RelativePath,
|
|
|
|
const Module *Imported) {
|
|
|
|
this->HashLoc = HashLoc;
|
|
|
|
this->IncludeTok = IncludeTok;
|
|
|
|
this->FileName = FileName.str();
|
|
|
|
this->IsAngled = IsAngled;
|
|
|
|
this->FilenameRange = FilenameRange;
|
|
|
|
this->File = File;
|
|
|
|
this->SearchPath = SearchPath.str();
|
|
|
|
this->RelativePath = RelativePath.str();
|
|
|
|
this->Imported = Imported;
|
|
|
|
}
|
|
|
|
|
|
|
|
SourceLocation HashLoc;
|
|
|
|
Token IncludeTok;
|
|
|
|
SmallString<16> FileName;
|
|
|
|
bool IsAngled;
|
|
|
|
CharSourceRange FilenameRange;
|
|
|
|
const FileEntry* File;
|
|
|
|
SmallString<16> SearchPath;
|
|
|
|
SmallString<16> RelativePath;
|
|
|
|
const Module* Imported;
|
|
|
|
};
|
|
|
|
|
2013-10-12 17:29:48 +08:00
|
|
|
// Stub to collect data from PragmaOpenCLExtension callbacks.
|
|
|
|
class PragmaOpenCLExtensionCallbacks : public PPCallbacks {
|
|
|
|
public:
|
|
|
|
typedef struct {
|
2013-10-14 15:13:59 +08:00
|
|
|
SmallString<16> Name;
|
2013-10-12 17:29:48 +08:00
|
|
|
unsigned State;
|
|
|
|
} CallbackParameters;
|
|
|
|
|
|
|
|
PragmaOpenCLExtensionCallbacks() : Name("Not called."), State(99) {};
|
|
|
|
|
|
|
|
void PragmaOpenCLExtension(
|
|
|
|
clang::SourceLocation NameLoc, const clang::IdentifierInfo *Name,
|
|
|
|
clang::SourceLocation StateLoc, unsigned State) {
|
|
|
|
this->NameLoc = NameLoc;
|
2013-10-14 15:13:59 +08:00
|
|
|
this->Name = Name->getName();
|
2013-10-12 17:29:48 +08:00
|
|
|
this->StateLoc = StateLoc;
|
|
|
|
this->State = State;
|
|
|
|
};
|
|
|
|
|
|
|
|
SourceLocation NameLoc;
|
2013-10-14 15:13:59 +08:00
|
|
|
SmallString<16> Name;
|
2013-10-12 17:29:48 +08:00
|
|
|
SourceLocation StateLoc;
|
|
|
|
unsigned State;
|
|
|
|
};
|
|
|
|
|
2012-11-02 01:52:58 +08:00
|
|
|
// PPCallbacks test fixture.
|
|
|
|
class PPCallbacksTest : public ::testing::Test {
|
|
|
|
protected:
|
|
|
|
PPCallbacksTest()
|
|
|
|
: FileMgr(FileMgrOpts),
|
|
|
|
DiagID(new DiagnosticIDs()),
|
|
|
|
DiagOpts(new DiagnosticOptions()),
|
|
|
|
Diags(DiagID, DiagOpts.getPtr(), new IgnoringDiagConsumer()),
|
|
|
|
SourceMgr(Diags, FileMgr) {
|
|
|
|
TargetOpts = new TargetOptions();
|
|
|
|
TargetOpts->Triple = "x86_64-apple-darwin11.1.0";
|
2012-11-16 12:40:11 +08:00
|
|
|
Target = TargetInfo::CreateTargetInfo(Diags, &*TargetOpts);
|
2012-11-02 01:52:58 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
FileSystemOptions FileMgrOpts;
|
|
|
|
FileManager FileMgr;
|
|
|
|
IntrusiveRefCntPtr<DiagnosticIDs> DiagID;
|
|
|
|
IntrusiveRefCntPtr<DiagnosticOptions> DiagOpts;
|
|
|
|
DiagnosticsEngine Diags;
|
|
|
|
SourceManager SourceMgr;
|
|
|
|
LangOptions LangOpts;
|
|
|
|
IntrusiveRefCntPtr<TargetOptions> TargetOpts;
|
|
|
|
IntrusiveRefCntPtr<TargetInfo> Target;
|
|
|
|
|
|
|
|
// Register a header path as a known file and add its location
|
|
|
|
// to search path.
|
|
|
|
void AddFakeHeader(HeaderSearch& HeaderInfo, const char* HeaderPath,
|
|
|
|
bool IsSystemHeader) {
|
|
|
|
// Tell FileMgr about header.
|
|
|
|
FileMgr.getVirtualFile(HeaderPath, 0, 0);
|
|
|
|
|
|
|
|
// Add header's parent path to search path.
|
|
|
|
StringRef SearchPath = path::parent_path(HeaderPath);
|
|
|
|
const DirectoryEntry *DE = FileMgr.getDirectory(SearchPath);
|
2013-01-25 09:50:28 +08:00
|
|
|
DirectoryLookup DL(DE, SrcMgr::C_User, false);
|
2012-11-02 01:52:58 +08:00
|
|
|
HeaderInfo.AddSearchPath(DL, IsSystemHeader);
|
|
|
|
}
|
|
|
|
|
|
|
|
// Get the raw source string of the range.
|
|
|
|
StringRef GetSourceString(CharSourceRange Range) {
|
|
|
|
const char* B = SourceMgr.getCharacterData(Range.getBegin());
|
|
|
|
const char* E = SourceMgr.getCharacterData(Range.getEnd());
|
|
|
|
|
|
|
|
return StringRef(B, E - B);
|
|
|
|
}
|
|
|
|
|
|
|
|
// Run lexer over SourceText and collect FilenameRange from
|
|
|
|
// the InclusionDirective callback.
|
|
|
|
CharSourceRange InclusionDirectiveFilenameRange(const char* SourceText,
|
|
|
|
const char* HeaderPath, bool SystemHeader) {
|
|
|
|
MemoryBuffer *Buf = MemoryBuffer::getMemBuffer(SourceText);
|
|
|
|
(void)SourceMgr.createMainFileIDForMemBuffer(Buf);
|
|
|
|
|
|
|
|
VoidModuleLoader ModLoader;
|
|
|
|
|
|
|
|
IntrusiveRefCntPtr<HeaderSearchOptions> HSOpts = new HeaderSearchOptions();
|
Use the same SourceManager for ModuleMaps and compilations.
This allows using virtual file mappings on the original SourceManager to
map in virtual module.map files. Without this patch, the ModuleMap
search will find a module.map file (as the FileEntry exists in the
FileManager), but will be unable to get the content from the
SourceManager (as ModuleMap previously created its own SourceManager).
Two problems needed to be fixed which this patch exposed:
1. Storing the inferred module map
When writing out a module, the ASTWriter stores the names of the files
in the main source manager; when loading the AST again, the ASTReader
errs out if such a file is found missing, unless it is overridden.
Previously CompilerInstance's compileModule method would store the
inferred module map to a temporary file; the problem with this approach
is that now that the module map is handled by the main source manager,
the ASTWriter stores the name of the temporary module map as source to
the compilation; later, when the module is loaded, the temporary file
has already been deleted, which leads to a compilation error. This patch
changes the inferred module map to instead inject a virtual file into
the source manager. This both saves some disk IO, and works with how the
ASTWriter/ASTReader handle overridden source files.
2. Changing test input in test/Modules/Inputs/*
Now that the module map file is handled by the main source manager, the
VerifyDiagnosticConsumer will not ignore diagnostics created while
parsing the module map file. The module test test/Modules/renamed.m uses
-I test/Modules/Inputs and triggers recursive loading of all module maps
in test/Modules/Inputs, some of which had conflicting names, thus
leading errors while parsing the module maps. Those diagnostics already
occur on trunk, but before this patch they would not break the test, as
they were ignored by the VerifyDiagnosticConsumer. This patch thus
changes the module maps that have been recently introduced which broke
the invariant of compatible modules maps in test/Modules/Inputs.
llvm-svn: 193314
2013-10-24 15:51:24 +08:00
|
|
|
HeaderSearch HeaderInfo(HSOpts, SourceMgr, Diags, LangOpts,
|
|
|
|
Target.getPtr());
|
2012-11-02 01:52:58 +08:00
|
|
|
AddFakeHeader(HeaderInfo, HeaderPath, SystemHeader);
|
|
|
|
|
|
|
|
IntrusiveRefCntPtr<PreprocessorOptions> PPOpts = new PreprocessorOptions();
|
2014-05-02 11:43:38 +08:00
|
|
|
Preprocessor PP(PPOpts, Diags, LangOpts, SourceMgr, HeaderInfo, ModLoader,
|
|
|
|
/*IILookup =*/0,
|
|
|
|
/*OwnsHeaderSearch =*/false);
|
2014-05-02 11:43:30 +08:00
|
|
|
PP.Initialize(*Target);
|
2012-11-02 01:52:58 +08:00
|
|
|
InclusionDirectiveCallbacks* Callbacks = new InclusionDirectiveCallbacks;
|
|
|
|
PP.addPPCallbacks(Callbacks); // Takes ownership.
|
|
|
|
|
|
|
|
// Lex source text.
|
|
|
|
PP.EnterMainSourceFile();
|
|
|
|
|
|
|
|
while (true) {
|
|
|
|
Token Tok;
|
|
|
|
PP.Lex(Tok);
|
|
|
|
if (Tok.is(tok::eof))
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Callbacks have been executed at this point -- return filename range.
|
|
|
|
return Callbacks->FilenameRange;
|
|
|
|
}
|
2013-10-12 17:29:48 +08:00
|
|
|
|
|
|
|
PragmaOpenCLExtensionCallbacks::CallbackParameters
|
|
|
|
PragmaOpenCLExtensionCall(const char* SourceText) {
|
|
|
|
LangOptions OpenCLLangOpts;
|
|
|
|
OpenCLLangOpts.OpenCL = 1;
|
|
|
|
|
|
|
|
MemoryBuffer* sourceBuf = MemoryBuffer::getMemBuffer(SourceText, "test.cl");
|
|
|
|
(void)SourceMgr.createMainFileIDForMemBuffer(sourceBuf);
|
|
|
|
|
|
|
|
VoidModuleLoader ModLoader;
|
Use the same SourceManager for ModuleMaps and compilations.
This allows using virtual file mappings on the original SourceManager to
map in virtual module.map files. Without this patch, the ModuleMap
search will find a module.map file (as the FileEntry exists in the
FileManager), but will be unable to get the content from the
SourceManager (as ModuleMap previously created its own SourceManager).
Two problems needed to be fixed which this patch exposed:
1. Storing the inferred module map
When writing out a module, the ASTWriter stores the names of the files
in the main source manager; when loading the AST again, the ASTReader
errs out if such a file is found missing, unless it is overridden.
Previously CompilerInstance's compileModule method would store the
inferred module map to a temporary file; the problem with this approach
is that now that the module map is handled by the main source manager,
the ASTWriter stores the name of the temporary module map as source to
the compilation; later, when the module is loaded, the temporary file
has already been deleted, which leads to a compilation error. This patch
changes the inferred module map to instead inject a virtual file into
the source manager. This both saves some disk IO, and works with how the
ASTWriter/ASTReader handle overridden source files.
2. Changing test input in test/Modules/Inputs/*
Now that the module map file is handled by the main source manager, the
VerifyDiagnosticConsumer will not ignore diagnostics created while
parsing the module map file. The module test test/Modules/renamed.m uses
-I test/Modules/Inputs and triggers recursive loading of all module maps
in test/Modules/Inputs, some of which had conflicting names, thus
leading errors while parsing the module maps. Those diagnostics already
occur on trunk, but before this patch they would not break the test, as
they were ignored by the VerifyDiagnosticConsumer. This patch thus
changes the module maps that have been recently introduced which broke
the invariant of compatible modules maps in test/Modules/Inputs.
llvm-svn: 193314
2013-10-24 15:51:24 +08:00
|
|
|
HeaderSearch HeaderInfo(new HeaderSearchOptions, SourceMgr, Diags,
|
2013-10-12 17:29:48 +08:00
|
|
|
OpenCLLangOpts, Target.getPtr());
|
|
|
|
|
2014-05-02 11:43:38 +08:00
|
|
|
Preprocessor PP(new PreprocessorOptions(), Diags, OpenCLLangOpts, SourceMgr,
|
|
|
|
HeaderInfo, ModLoader, /*IILookup =*/0,
|
2014-05-02 11:43:30 +08:00
|
|
|
/*OwnsHeaderSearch =*/false);
|
|
|
|
PP.Initialize(*Target);
|
2013-10-12 17:29:48 +08:00
|
|
|
|
|
|
|
// parser actually sets correct pragma handlers for preprocessor
|
|
|
|
// according to LangOptions, so we init Parser to register opencl
|
|
|
|
// pragma handlers
|
2014-05-03 11:46:04 +08:00
|
|
|
ASTContext Context(OpenCLLangOpts, SourceMgr,
|
2013-10-12 17:29:48 +08:00
|
|
|
PP.getIdentifierTable(), PP.getSelectorTable(),
|
2014-05-03 11:46:04 +08:00
|
|
|
PP.getBuiltinInfo());
|
|
|
|
Context.InitBuiltinTypes(*Target);
|
|
|
|
|
2013-10-12 17:29:48 +08:00
|
|
|
ASTConsumer Consumer;
|
|
|
|
Sema S(PP, Context, Consumer);
|
|
|
|
Parser P(PP, S, false);
|
|
|
|
PragmaOpenCLExtensionCallbacks* Callbacks = new PragmaOpenCLExtensionCallbacks;
|
|
|
|
PP.addPPCallbacks(Callbacks); // Takes ownership.
|
|
|
|
|
|
|
|
// Lex source text.
|
|
|
|
PP.EnterMainSourceFile();
|
|
|
|
while (true) {
|
|
|
|
Token Tok;
|
|
|
|
PP.Lex(Tok);
|
|
|
|
if (Tok.is(tok::eof))
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
PragmaOpenCLExtensionCallbacks::CallbackParameters RetVal = {
|
2013-10-14 15:13:59 +08:00
|
|
|
Callbacks->Name,
|
2013-10-12 17:29:48 +08:00
|
|
|
Callbacks->State
|
|
|
|
};
|
|
|
|
return RetVal;
|
|
|
|
}
|
2012-11-02 01:52:58 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
TEST_F(PPCallbacksTest, QuotedFilename) {
|
|
|
|
const char* Source =
|
|
|
|
"#include \"quoted.h\"\n";
|
|
|
|
|
|
|
|
CharSourceRange Range =
|
|
|
|
InclusionDirectiveFilenameRange(Source, "/quoted.h", false);
|
|
|
|
|
|
|
|
ASSERT_EQ("\"quoted.h\"", GetSourceString(Range));
|
|
|
|
}
|
|
|
|
|
|
|
|
TEST_F(PPCallbacksTest, AngledFilename) {
|
|
|
|
const char* Source =
|
|
|
|
"#include <angled.h>\n";
|
|
|
|
|
|
|
|
CharSourceRange Range =
|
|
|
|
InclusionDirectiveFilenameRange(Source, "/angled.h", true);
|
|
|
|
|
|
|
|
ASSERT_EQ("<angled.h>", GetSourceString(Range));
|
|
|
|
}
|
|
|
|
|
|
|
|
TEST_F(PPCallbacksTest, QuotedInMacro) {
|
|
|
|
const char* Source =
|
|
|
|
"#define MACRO_QUOTED \"quoted.h\"\n"
|
|
|
|
"#include MACRO_QUOTED\n";
|
|
|
|
|
|
|
|
CharSourceRange Range =
|
|
|
|
InclusionDirectiveFilenameRange(Source, "/quoted.h", false);
|
|
|
|
|
|
|
|
ASSERT_EQ("\"quoted.h\"", GetSourceString(Range));
|
|
|
|
}
|
|
|
|
|
|
|
|
TEST_F(PPCallbacksTest, AngledInMacro) {
|
|
|
|
const char* Source =
|
|
|
|
"#define MACRO_ANGLED <angled.h>\n"
|
|
|
|
"#include MACRO_ANGLED\n";
|
|
|
|
|
|
|
|
CharSourceRange Range =
|
|
|
|
InclusionDirectiveFilenameRange(Source, "/angled.h", true);
|
|
|
|
|
|
|
|
ASSERT_EQ("<angled.h>", GetSourceString(Range));
|
|
|
|
}
|
|
|
|
|
|
|
|
TEST_F(PPCallbacksTest, StringizedMacroArgument) {
|
|
|
|
const char* Source =
|
|
|
|
"#define MACRO_STRINGIZED(x) #x\n"
|
|
|
|
"#include MACRO_STRINGIZED(quoted.h)\n";
|
|
|
|
|
|
|
|
CharSourceRange Range =
|
|
|
|
InclusionDirectiveFilenameRange(Source, "/quoted.h", false);
|
|
|
|
|
|
|
|
ASSERT_EQ("\"quoted.h\"", GetSourceString(Range));
|
|
|
|
}
|
|
|
|
|
|
|
|
TEST_F(PPCallbacksTest, ConcatenatedMacroArgument) {
|
|
|
|
const char* Source =
|
|
|
|
"#define MACRO_ANGLED <angled.h>\n"
|
|
|
|
"#define MACRO_CONCAT(x, y) x ## _ ## y\n"
|
|
|
|
"#include MACRO_CONCAT(MACRO, ANGLED)\n";
|
|
|
|
|
|
|
|
CharSourceRange Range =
|
|
|
|
InclusionDirectiveFilenameRange(Source, "/angled.h", false);
|
|
|
|
|
|
|
|
ASSERT_EQ("<angled.h>", GetSourceString(Range));
|
|
|
|
}
|
|
|
|
|
|
|
|
TEST_F(PPCallbacksTest, TrigraphFilename) {
|
|
|
|
const char* Source =
|
2012-11-04 04:58:26 +08:00
|
|
|
"#include \"tri\?\?-graph.h\"\n";
|
2012-11-02 01:52:58 +08:00
|
|
|
|
|
|
|
CharSourceRange Range =
|
|
|
|
InclusionDirectiveFilenameRange(Source, "/tri~graph.h", false);
|
|
|
|
|
2012-11-04 04:58:26 +08:00
|
|
|
ASSERT_EQ("\"tri\?\?-graph.h\"", GetSourceString(Range));
|
2012-11-02 01:52:58 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
TEST_F(PPCallbacksTest, TrigraphInMacro) {
|
|
|
|
const char* Source =
|
2012-11-04 04:58:26 +08:00
|
|
|
"#define MACRO_TRIGRAPH \"tri\?\?-graph.h\"\n"
|
2012-11-02 01:52:58 +08:00
|
|
|
"#include MACRO_TRIGRAPH\n";
|
|
|
|
|
|
|
|
CharSourceRange Range =
|
|
|
|
InclusionDirectiveFilenameRange(Source, "/tri~graph.h", false);
|
|
|
|
|
2012-11-04 04:58:26 +08:00
|
|
|
ASSERT_EQ("\"tri\?\?-graph.h\"", GetSourceString(Range));
|
2012-11-02 01:52:58 +08:00
|
|
|
}
|
|
|
|
|
2013-10-12 17:29:48 +08:00
|
|
|
TEST_F(PPCallbacksTest, OpenCLExtensionPragmaEnabled) {
|
|
|
|
const char* Source =
|
|
|
|
"#pragma OPENCL EXTENSION cl_khr_fp64 : enable\n";
|
|
|
|
|
|
|
|
PragmaOpenCLExtensionCallbacks::CallbackParameters Parameters =
|
|
|
|
PragmaOpenCLExtensionCall(Source);
|
|
|
|
|
|
|
|
ASSERT_EQ("cl_khr_fp64", Parameters.Name);
|
|
|
|
unsigned ExpectedState = 1;
|
|
|
|
ASSERT_EQ(ExpectedState, Parameters.State);
|
|
|
|
}
|
|
|
|
|
|
|
|
TEST_F(PPCallbacksTest, OpenCLExtensionPragmaDisabled) {
|
|
|
|
const char* Source =
|
|
|
|
"#pragma OPENCL EXTENSION cl_khr_fp16 : disable\n";
|
|
|
|
|
|
|
|
PragmaOpenCLExtensionCallbacks::CallbackParameters Parameters =
|
|
|
|
PragmaOpenCLExtensionCall(Source);
|
|
|
|
|
|
|
|
ASSERT_EQ("cl_khr_fp16", Parameters.Name);
|
|
|
|
unsigned ExpectedState = 0;
|
|
|
|
ASSERT_EQ(ExpectedState, Parameters.State);
|
|
|
|
}
|
|
|
|
|
2012-11-02 01:52:58 +08:00
|
|
|
} // anonoymous namespace
|