Пример #1
0
TEST_F(UsesAnalysisTests,
GetUseInfoRightUseTest) {
	// Testing if analysis returns correct info for instruction.
	//
	// @glob0 = global i32 0
	// define void @func1() {
	// bbInFunc1:
	//   %x = load i32, i32* @glob0
	// }
	//

	// Creating input of test is in constructor of this test class.
	LoadInst *loadInst(new LoadInst(glob, "x", bbInFunc1));
	GlobVarSet globs{glob};
	usesAnalysis.doUsesAnalysis(globs);

	const UsesAnalysis::UseInfo *info(usesAnalysis.getUseInfo(*bbInFunc1,
		*loadInst));

	ASSERT_TRUE(info) <<
		"expected not the null pointer. \n";

	EXPECT_FALSE(info->isLUse) <<
		"expected that contained info is right use. \n";
}
Пример #2
0
bool Infogrames::loadSong(const char *fileName) {
	clearSong();

	if (!_instruments)
		if (!loadInst("i1.ins"))
			return false;

	_song = new Audio::Infogrames(*_instruments, true,
			_mixer->getOutputRate(), _mixer->getOutputRate() / 75);

	if (!_song->load(fileName)) {
		warning("Infogrames: Couldn't load music \"%s\"", fileName);
		clearSong();
		return false;
	}

	return true;
}
Пример #3
0
bool Infogrames::loadInstruments(const char *fileName) {
	clearSong();
	clearInstruments();

	return loadInst(fileName);
}