Skip to content

Commit

Permalink
Remove more Bing test compatability shims.
Browse files Browse the repository at this point in the history
  • Loading branch information
danluu committed May 20, 2016
1 parent 57e7792 commit dda5ee8
Show file tree
Hide file tree
Showing 14 changed files with 129 additions and 136 deletions.
12 changes: 6 additions & 6 deletions UnitTest/CodeGenUnitTest/BitOperationsUnitTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ namespace NativeJIT
{
namespace BitOperationsUnitTest
{
TEST_CASE(BitOperations, NonZeroBitCount)
TEST(BitOperations, NonZeroBitCount)
{
ASSERT_EQ(0, BitOp::GetNonZeroBitCount(0u));
ASSERT_EQ(0, BitOp::GetNonZeroBitCountFallback(0u));
Expand Down Expand Up @@ -69,7 +69,7 @@ namespace NativeJIT
"Mismatched expected and actual bit for " << testValue;
}

TEST_CASE(BitOperations, LowestBitSet)
TEST(BitOperations, LowestBitSet)
{
unsigned unused;
ASSERT_TRUE(!BitOp::GetLowestBitSet(0, &unused));
Expand All @@ -93,7 +93,7 @@ namespace NativeJIT
}


TEST_CASE(BitOperations, HighestBitSet)
TEST(BitOperations, HighestBitSet)
{
unsigned unused;
ASSERT_TRUE(!BitOp::GetHighestBitSet(0, &unused));
Expand All @@ -104,7 +104,7 @@ namespace NativeJIT
}


TEST_CASE(BitOperations, TestBit)
TEST(BitOperations, TestBit)
{
const uint64_t bits62and63 = 0xC000000000000000;

Expand All @@ -124,7 +124,7 @@ namespace NativeJIT
}


TEST_CASE(BitOperations, SetBit)
TEST(BitOperations, SetBit)
{
uint64_t currentValue = 0;
uint64_t allOnes = 0xFFFFFFFFFFFFFFFF;
Expand All @@ -142,7 +142,7 @@ namespace NativeJIT
}


TEST_CASE(BitOperations, ClearBit)
TEST(BitOperations, ClearBit)
{
uint64_t currentValue = 0xFFFFFFFFFFFFFFFF;
uint64_t allZeros = 0;
Expand Down
4 changes: 2 additions & 2 deletions UnitTest/CodeGenUnitTest/CodeGenUnitTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ namespace NativeJIT
// TODO: JMP
// TODO: JCC - all cases.

TEST_CASE_F(CodeGen, JCC)
TEST_F(CodeGen, JCC)
{
auto setup = GetSetup();
auto& buffer = setup->GetCode();
Expand All @@ -55,7 +55,7 @@ namespace NativeJIT
}


TEST_CASE_F(CodeGen, OpCodes)
TEST_F(CodeGen, OpCodes)
{
auto setup = GetSetup();
auto& buffer = setup->GetCode();
Expand Down
24 changes: 12 additions & 12 deletions UnitTest/CodeGenUnitTest/FunctionBufferUnitTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ namespace NativeJIT
TEST_FIXTURE_END_TEST_CASES_BEGIN


TEST_CASE_F(FunctionBufferTest, Trivial)
TEST_F(FunctionBufferTest, Trivial)
{
auto setup = GetSetup();
auto & code = setup->GetCode();
Expand All @@ -282,7 +282,7 @@ namespace NativeJIT
offsets);

VerifyProlog(spec, code);
ASSERT_NO_FATAL_FAILURES();
ASSERT_TRUE(!HasFatalFailure());

// Verify unwind info.
auto & unwindInfo = *reinterpret_cast<UnwindInfo const *>(spec.GetUnwindInfoBuffer());
Expand All @@ -302,7 +302,7 @@ namespace NativeJIT
}


TEST_CASE_F(FunctionBufferTest, FunctionWithCalls)
TEST_F(FunctionBufferTest, FunctionWithCalls)
{
auto setup = GetSetup();
auto & code = setup->GetCode();
Expand All @@ -323,7 +323,7 @@ namespace NativeJIT
offsets);

VerifyProlog(spec, code);
ASSERT_NO_FATAL_FAILURES();
ASSERT_TRUE(!HasFatalFailure());

// Verify unwind info.
auto & unwindInfo = *reinterpret_cast<UnwindInfo const *>(spec.GetUnwindInfoBuffer());
Expand All @@ -343,7 +343,7 @@ namespace NativeJIT
}


TEST_CASE_F(FunctionBufferTest, LargeStackAlloc)
TEST_F(FunctionBufferTest, LargeStackAlloc)
{
auto setup = GetSetup();
auto & code = setup->GetCode();
Expand All @@ -364,7 +364,7 @@ namespace NativeJIT
offsets);

VerifyProlog(spec, code);
ASSERT_NO_FATAL_FAILURES();
ASSERT_TRUE(!HasFatalFailure());

// Verify unwind info.
auto & unwindInfo = *reinterpret_cast<UnwindInfo const *>(spec.GetUnwindInfoBuffer());
Expand All @@ -386,7 +386,7 @@ namespace NativeJIT
}


TEST_CASE_F(FunctionBufferTest, RbpSetToOldRsp)
TEST_F(FunctionBufferTest, RbpSetToOldRsp)
{
auto setup = GetSetup();
auto & code = setup->GetCode();
Expand Down Expand Up @@ -418,7 +418,7 @@ namespace NativeJIT
offsets);

VerifyProlog(spec, code);
ASSERT_NO_FATAL_FAILURES();
ASSERT_TRUE(!HasFatalFailure());

// Verify unwind info.
auto & unwindInfo = *reinterpret_cast<UnwindInfo const *>(spec.GetUnwindInfoBuffer());
Expand Down Expand Up @@ -446,7 +446,7 @@ namespace NativeJIT
}


TEST_CASE_F(FunctionBufferTest, Complex)
TEST_F(FunctionBufferTest, Complex)
{
auto setup = GetSetup();
auto & code = setup->GetCode();
Expand Down Expand Up @@ -496,7 +496,7 @@ namespace NativeJIT
offsets);

VerifyProlog(spec, code);
ASSERT_NO_FATAL_FAILURES();
ASSERT_TRUE(!HasFatalFailure());

// Verify unwind info.
auto & unwindInfo = *reinterpret_cast<UnwindInfo const *>(spec.GetUnwindInfoBuffer());
Expand Down Expand Up @@ -545,7 +545,7 @@ namespace NativeJIT
}


TEST_CASE_F(FunctionBufferTest, Exception)
TEST_F(FunctionBufferTest, Exception)
{
auto setup = GetSetup();

Expand Down Expand Up @@ -603,7 +603,7 @@ namespace NativeJIT
// This tests that, FunctionSpecification correctly drives non-volatile
// save and restore. This does not test that the register allocator
// correctly indicates which volatiles were clobbered.
TEST_CASE_F(FunctionBufferTest, RegisterPreservation)
TEST_F(FunctionBufferTest, RegisterPreservation)
{
ALIGNAS(16) RegInfo before;
ALIGNAS(16) RegInfo after;
Expand Down
2 changes: 1 addition & 1 deletion UnitTest/CodeGenUnitTest/InstructionEncodingUnitTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ namespace NativeJIT

// Test REX and ModRM bytes by verifying all permutations of src/dest
// registers.
TEST_CASE_F(InstructionEnconding, RexAndModRM)
TEST_F(InstructionEnconding, RexAndModRM)
{
auto setup = GetSetup();
auto& buffer = setup->GetCode();
Expand Down
16 changes: 8 additions & 8 deletions UnitTest/NativeJITUnitTest/BitFunnelAcceptanceTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1239,7 +1239,7 @@ namespace NativeJIT

TEST_FIXTURE_END_TEST_CASES_BEGIN

TEST_CASE_F(Acceptance, SingleWord)
TEST_F(Acceptance, SingleWord)
{
// house
QueryWords queryWords
Expand All @@ -1261,7 +1261,7 @@ namespace NativeJIT
}


TEST_CASE_F(Acceptance, MultipleWords)
TEST_F(Acceptance, MultipleWords)
{
// red dog house
QueryWords queryWords
Expand Down Expand Up @@ -1293,7 +1293,7 @@ namespace NativeJIT
}


TEST_CASE_F(Acceptance, Phrase)
TEST_F(Acceptance, Phrase)
{
// red "dog house"
QueryWords queryWords
Expand Down Expand Up @@ -1324,7 +1324,7 @@ namespace NativeJIT
}


TEST_CASE_F(Acceptance, WordCandidates)
TEST_F(Acceptance, WordCandidates)
{
// red word:("dog house" houses)
QueryWords queryWords
Expand Down Expand Up @@ -1356,7 +1356,7 @@ namespace NativeJIT
}


TEST_CASE_F(Acceptance, ClickPhrase)
TEST_F(Acceptance, ClickPhrase)
{
QueryWords queryWords
{
Expand Down Expand Up @@ -1394,7 +1394,7 @@ namespace NativeJIT
}


TEST_CASE_F(Acceptance, ConstraintDiscard)
TEST_F(Acceptance, ConstraintDiscard)
{
QueryWords queryWords
{
Expand Down Expand Up @@ -1429,7 +1429,7 @@ namespace NativeJIT
}


TEST_CASE_F(Acceptance, CompletelyDifferentMarket)
TEST_F(Acceptance, CompletelyDifferentMarket)
{
QueryWords queryWords
{
Expand All @@ -1448,7 +1448,7 @@ namespace NativeJIT
}


TEST_CASE_F(Acceptance, DifferentMarketWithSameLanguage)
TEST_F(Acceptance, DifferentMarketWithSameLanguage)
{
QueryWords queryWords
{
Expand Down
24 changes: 12 additions & 12 deletions UnitTest/NativeJITUnitTest/CastUnitTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ namespace NativeJIT

// A no-op test which ensures that the type returned by
// Add/RemoveTargetConstCast is correct by getting compiled.
TEST_CASE_F(CastTest, TargetCast)
TEST_F(CastTest, TargetCast)
{
auto setup = GetSetup();

Expand All @@ -163,7 +163,7 @@ namespace NativeJIT
}


TEST_CASE_F(CastTest, ConstCastNonReference)
TEST_F(CastTest, ConstCastNonReference)
{
auto setup = GetSetup();

Expand All @@ -175,7 +175,7 @@ namespace NativeJIT
}


TEST_CASE_F(CastTest, ConstCastReference)
TEST_F(CastTest, ConstCastReference)
{
auto setup = GetSetup();

Expand All @@ -187,35 +187,35 @@ namespace NativeJIT
}


TEST_CASE_F(CastTest, FromInt8)
TEST_F(CastTest, FromInt8)
{
TestCasts<int8_t>(-1);
TestCasts<uint8_t>(0xFF);
}


TEST_CASE_F(CastTest, FromInt16)
TEST_F(CastTest, FromInt16)
{
TestCasts<int16_t>(-1);
TestCasts<uint16_t>(0xFFFF);
}


TEST_CASE_F(CastTest, FromInt32)
TEST_F(CastTest, FromInt32)
{
TestCasts<int32_t>(-1);
TestCasts<uint32_t>(0xFFFFFFFF);
}


TEST_CASE_F(CastTest, FromInt64)
TEST_F(CastTest, FromInt64)
{
TestCasts<int64_t>(-1);
TestCasts<uint64_t>(0xFFFFFFFFFFFFFFFFul);
}


TEST_CASE_F(CastTest, FromFloat)
TEST_F(CastTest, FromFloat)
{
TestCasts<float>(-123.7f);
TestCasts<float>(123.7f);
Expand All @@ -225,7 +225,7 @@ namespace NativeJIT
}


TEST_CASE_F(CastTest, FromDouble)
TEST_F(CastTest, FromDouble)
{
TestCasts<double>(-123.7);
TestCasts<double>(123.7);
Expand All @@ -235,7 +235,7 @@ namespace NativeJIT
}


TEST_CASE_F(CastTest, Packed)
TEST_F(CastTest, Packed)
{
auto packed = Packed<3, 4, 5>::FromComponents(7, 15, 31);

Expand All @@ -244,13 +244,13 @@ namespace NativeJIT
}


TEST_CASE_F(CastTest, VoidPointer)
TEST_F(CastTest, VoidPointer)
{
TestCast<uint64_t, void*>(this);
}


TEST_CASE_F(CastTest, FuncPointer)
TEST_F(CastTest, FuncPointer)
{
auto funcPtr = &DummyFunc;
TestCast<decltype(funcPtr), void*>(reinterpret_cast<void*>(funcPtr));
Expand Down
Loading

0 comments on commit dda5ee8

Please sign in to comment.