Home
last modified time | relevance | path

Searched refs:Assert (Results 1 – 25 of 94) sorted by relevance

1234

/Renode-Infrastructure-v1.15.3-29f510e/src/Emulator/Main/Tests/UnitTests/
DBitHelperTests.cs18 Assert.AreEqual(0x00, BitHelper.ReverseBits((byte)0x00)); in ShouldReverseBitsByByte()
19 Assert.AreEqual(0x00, BitHelper.ReverseBitsByByte(0x00)); in ShouldReverseBitsByByte()
20 Assert.AreEqual(0x4D, BitHelper.ReverseBits((byte)0xB2)); in ShouldReverseBitsByByte()
21 Assert.AreEqual(0x1A2B3C4D, BitHelper.ReverseBitsByByte(0x58D43CB2)); in ShouldReverseBitsByByte()
27 Assert.AreEqual(0x00, BitHelper.ReverseBits((ushort)0x00)); in ShouldReverseBitsByWord()
28 Assert.AreEqual(0x00, BitHelper.ReverseBitsByWord(0x00)); in ShouldReverseBitsByWord()
29 Assert.AreEqual(0x3C4D, BitHelper.ReverseBits((ushort)0xB23C)); in ShouldReverseBitsByWord()
30 Assert.AreEqual(0x1A2B3C4D, BitHelper.ReverseBitsByWord(0xD458B23C)); in ShouldReverseBitsByWord()
36 Assert.AreEqual(0x00, BitHelper.ReverseBits((uint)0x00)); in ShouldReverseDoubleWordBits()
37 Assert.AreEqual(0x1A2B3C4D, BitHelper.ReverseBits((uint)0xB23CD458)); in ShouldReverseDoubleWordBits()
[all …]
DReadExtensionsTest.cs53 Assert.AreEqual(0x12, wordPeripheral.ReadByteUsingWord(0)); in ShouldReadByteUsingWord()
54 Assert.AreEqual(0x34, wordPeripheral.ReadByteUsingWord(1)); in ShouldReadByteUsingWord()
55 Assert.AreEqual(0x56, wordPeripheral.ReadByteUsingWord(2)); in ShouldReadByteUsingWord()
56 Assert.AreEqual(0x78, wordPeripheral.ReadByteUsingWord(3)); in ShouldReadByteUsingWord()
62 Assert.AreEqual(0x34, wordPeripheral.ReadByteUsingWordBigEndian(0)); in ShouldReadByteUsingWordBigEndian()
63 Assert.AreEqual(0x12, wordPeripheral.ReadByteUsingWordBigEndian(1)); in ShouldReadByteUsingWordBigEndian()
64 Assert.AreEqual(0x78, wordPeripheral.ReadByteUsingWordBigEndian(2)); in ShouldReadByteUsingWordBigEndian()
65 Assert.AreEqual(0x56, wordPeripheral.ReadByteUsingWordBigEndian(3)); in ShouldReadByteUsingWordBigEndian()
71 Assert.AreEqual(0x12, dwordPeripheral.ReadByteUsingDoubleWord(0)); in ShouldReadByteUsingDoubleWord()
72 Assert.AreEqual(0x34, dwordPeripheral.ReadByteUsingDoubleWord(1)); in ShouldReadByteUsingDoubleWord()
[all …]
DRegisterEnumParserTests.cs24 Assert.AreEqual(1, parser.Registers.Length); in ShouldParseEnumWithSimpleValue()
25 Assert.AreEqual(0, parser.RegisterGroups.Length); in ShouldParseEnumWithSimpleValue()
27 Assert.AreEqual("A", parser.Registers[0].Name); in ShouldParseEnumWithSimpleValue()
28 Assert.AreEqual(32, parser.Registers[0].Width); in ShouldParseEnumWithSimpleValue()
29 Assert.AreEqual(0, parser.Registers[0].Value); in ShouldParseEnumWithSimpleValue()
42 Assert.AreEqual(3, parser.Registers.Length); in ShouldParseEnumWithMultipleValues()
43 Assert.AreEqual(0, parser.RegisterGroups.Length); in ShouldParseEnumWithMultipleValues()
45 Assert.AreEqual("A", parser.Registers[0].Name); in ShouldParseEnumWithMultipleValues()
46 Assert.AreEqual(32, parser.Registers[0].Width); in ShouldParseEnumWithMultipleValues()
47 Assert.AreEqual(0, parser.Registers[0].Value); in ShouldParseEnumWithMultipleValues()
[all …]
DComparingTimerTests.cs23 Assert.Throws<InvalidOperationException>(() => timer.Compare = 30); in ShouldThrowOnCompareHigherThanLimit()
35 Assert.AreEqual(65535, timer.Value); in ShouldHandleCompareValueChangeWhenEnabled()
36 Assert.AreEqual(65535, timer.Compare); in ShouldHandleCompareValueChangeWhenEnabled()
37 Assert.AreEqual(1, compareCounter); in ShouldHandleCompareValueChangeWhenEnabled()
40 Assert.AreEqual(0, timer.Value); in ShouldHandleCompareValueChangeWhenEnabled()
41 Assert.AreEqual(65535, timer.Compare); in ShouldHandleCompareValueChangeWhenEnabled()
42 Assert.AreEqual(1, compareCounter); in ShouldHandleCompareValueChangeWhenEnabled()
47 Assert.AreEqual(16304, timer.Value); in ShouldHandleCompareValueChangeWhenEnabled()
48 Assert.AreEqual(65535, timer.Compare); in ShouldHandleCompareValueChangeWhenEnabled()
49 Assert.AreEqual(0, compareCounter); in ShouldHandleCompareValueChangeWhenEnabled()
[all …]
DMiscTests.cs19 Assert.AreEqual(new byte[] {0x0a}, Misc.HexStringToByteArray("0a")); in ShouldGetBytesFromHexString()
20 Assert.AreEqual( in ShouldGetBytesFromHexString()
24 Assert.AreEqual(new byte[] {0x0a, 0xb1}, Misc.HexStringToByteArray("0aB1")); in ShouldGetBytesFromHexString()
25Assert.AreEqual(new byte[] {0xb1, 0x0a}, Misc.HexStringToByteArray("0aB1", reverse: true)); in ShouldGetBytesFromHexString()
26 Assert.AreEqual(new byte[] {0x00, 0xab, 0x15}, Misc.HexStringToByteArray("00aB15")); in ShouldGetBytesFromHexString()
27Assert.AreEqual(new byte[] {0x15, 0xab, 0x00}, Misc.HexStringToByteArray("00aB15", reverse: true)); in ShouldGetBytesFromHexString()
28Assert.AreEqual(new byte[] {0xab}, Misc.HexStringToByteArray("a\tb", ignoreWhitespace: true)); in ShouldGetBytesFromHexString()
29Assert.AreEqual(new byte[] {0xab}, Misc.HexStringToByteArray("a\t \nb", ignoreWhitespace: true)); in ShouldGetBytesFromHexString()
30Assert.AreEqual(new byte[] {0xab, 0xcd}, Misc.HexStringToByteArray("ab cd", ignoreWhitespace: true… in ShouldGetBytesFromHexString()
31Assert.AreEqual(new byte[] {0xcd, 0xab}, Misc.HexStringToByteArray("ab cd", ignoreWhitespace: true… in ShouldGetBytesFromHexString()
[all …]
DRegistersTests.cs23 Assert.Catch<ConstructionException>(() => enumRWField.Value = (TwoBitEnum)(1 << 2)); in ShouldNotAcceptOutOfBoundsValues()
24 Assert.Catch<ConstructionException>(() => valueRWField.Value = (1 << 4)); in ShouldNotAcceptOutOfBoundsValues()
31 Assert.Catch<ArgumentException>(() => localRegister.DefineEnumField<TwoBitEnum>(0, -1)); in ShouldNotAcceptNegativeFields()
32 Assert.Catch<ArgumentException>(() => localRegister.DefineValueField(0, -1)); in ShouldNotAcceptNegativeFields()
48Assert.Catch<ArgumentException>(() => localRegister.DefineEnumField<TwoBitEnum>(registerAndPositio… in ShouldNotExceedRegisterSize()
57 Assert.Catch<ArgumentException>(() => localRegister.DefineValueField(0, 2)); in ShouldNotAllowIntersectingFields()
66 Assert.AreEqual(uint.MaxValue, localRegister.Read()); in ShouldWriteFieldsWithMaxLength()
73 Assert.AreEqual(true, flagRWField.Value); in ShouldReadBoolField()
80 Assert.AreEqual(TwoBitEnum.D, enumRWField.Value); in ShouldReadEnumField()
90 Assert.AreEqual(SixtyFourBitEnum.B, localEnumField.Value); in ShouldRead64BitWideEnum()
[all …]
DSVDParserTests.cs31 Assert.Throws<RecoverableException>(() => in ShouldThrowOnNonexistingFile()
41 Assert.Throws<RecoverableException>(() => in ShouldThrowOnEmptyFile()
50 Assert.Throws<RecoverableException>(() => in ShouldThrowOnInvalidXml()
59 Assert.Throws<RecoverableException>(() => in ShouldThrowOnInvalidSvd()
71 Assert.Throws<RecoverableException>(() => in ShouldThrowOnDeviceWithNoMandatoryFields()
83 Assert.Throws<RecoverableException>(() => in ShouldThrowOnDeviceWithNoPeripheralsTag()
96 Assert.Throws<RecoverableException>(() => in ShouldThrowOnDeviceWithNotEveryMandatoryField()
111 Assert.Throws<RecoverableException>(() => in ShouldThrowOnCpuWithoutEndianness()
129 Assert.Throws<RecoverableException>(() => in ShouldThrowOnPeripheralWithNotEveryMandatoryField()
145 Assert.Throws<RecoverableException>(() => in ShouldThrowOnClusterWithoutMandatoryFields()
[all …]
DPacketTests.cs30 Assert.AreEqual(3, Packet.CalculateLength<TestStructA>()); in TestLengthCalculation()
31 Assert.AreEqual(2, Packet.CalculateLength<TestStructB>()); in TestLengthCalculation()
32 Assert.AreEqual(4, Packet.CalculateLength<TestStructC>()); in TestLengthCalculation()
33 Assert.AreEqual(4, Packet.CalculateLength<TestStructArray>()); in TestLengthCalculation()
34 Assert.AreEqual(15, Packet.CalculateLength<TestStructDefaultOffsets>()); in TestLengthCalculation()
35 Assert.AreEqual(8, Packet.CalculateLength<TestStructALSB>()); in TestLengthCalculation()
36 Assert.AreEqual(8, Packet.CalculateLength<TestStructWithOneUsableBit>()); in TestLengthCalculation()
37 Assert.AreEqual(20, Packet.CalculateLength<TestNestedStruct>()); in TestLengthCalculation()
46 Assert.AreEqual(0xdbee, structureA.a); in TestDecode()
49 Assert.AreEqual(true, structureB.b0); in TestDecode()
[all …]
DSystemBusTests.cs41 Assert.AreEqual(0, read); in ShouldReturnZeroAtNonExistingDevice()
50 Assert.AreEqual(0x666, sysbus.ReadDoubleWord(1000)); in ShouldFindAfterRegistration()
65 Assert.AreEqual(0x666, sysbus.ReadDoubleWord(1000)); in ShouldFindAfterManyRegistrations()
66 Assert.AreEqual(0x667, sysbus.ReadDoubleWord(2000)); in ShouldFindAfterManyRegistrations()
67 Assert.AreEqual(0x668, sysbus.ReadDoubleWord(3000)); in ShouldFindAfterManyRegistrations()
109 Assert.AreEqual(0, value); in ShouldFindAfterManyRegistrationsAndRemoves()
113 Assert.AreEqual(regPoints[i], value); in ShouldFindAfterManyRegistrationsAndRemoves()
151 Assert.AreEqual(false, peripheral.ByteRead1); in ShouldRegisterMultiFunctionPeripheral()
152 Assert.AreEqual(false, peripheral.ByteRead2); in ShouldRegisterMultiFunctionPeripheral()
153 Assert.AreEqual(false, peripheral.ByteWritten1); in ShouldRegisterMultiFunctionPeripheral()
[all …]
DCRCTests.cs19 Assert.Throws<ArgumentException>( in ShouldThrowArgumentException()
22 Assert.Throws<ArgumentOutOfRangeException>( in ShouldThrowArgumentException()
25 Assert.Throws<ArgumentOutOfRangeException>( in ShouldThrowArgumentException()
35 Assert.AreEqual(0x0000000, crc.Value); in ShouldCalculateMultipleUpdates()
37 Assert.AreEqual(0x51DE003A, crc.Value); in ShouldCalculateMultipleUpdates()
39 Assert.AreEqual(0xE8A5632, crc.Value); in ShouldCalculateMultipleUpdates()
47 Assert.AreEqual(0xCE1E8E92, crc.Value); in ShouldHandleReflections()
51 Assert.AreEqual(0xE6AC054A, crc.Value); in ShouldHandleReflections()
55 Assert.AreEqual(0x49717873, crc.Value); in ShouldHandleReflections()
62 Assert.AreEqual(0xE8A5632, crc32.Calculate(new byte[] { 0x31, 0x32 })); in ShouldInitConfigProperly()
[all …]
DTimeTests.cs26 Assert.AreEqual(0, counter); in ShouldTickWithOneHandler()
28 Assert.AreEqual(1, counter); in ShouldTickWithOneHandler()
30 Assert.AreEqual(1, counter); in ShouldTickWithOneHandler()
32 Assert.AreEqual(2, counter); in ShouldTickWithOneHandler()
45 Assert.AreEqual(1, counterA); in ShouldTickWithTwoHandlers()
46 Assert.AreEqual(0, counterB); in ShouldTickWithTwoHandlers()
48 Assert.AreEqual(2, counterA); in ShouldTickWithTwoHandlers()
49 Assert.AreEqual(0, counterB); in ShouldTickWithTwoHandlers()
51 Assert.AreEqual(2, counterA); in ShouldTickWithTwoHandlers()
52 Assert.AreEqual(1, counterB); in ShouldTickWithTwoHandlers()
[all …]
DSimpleCacheTests.cs31 Assert.AreEqual(beforeMisses, afterMisses); in ShouldNotMissCache()
32 Assert.AreEqual(beforeHits + 1, afterHits); in ShouldNotMissCache()
33 Assert.AreEqual(result, resultAfter); in ShouldNotMissCache()
45 Assert.AreEqual(beforeHits + 1, afterHits); in ShouldNotMissCacheWithTwoParameters()
46 Assert.AreEqual(beforeMisses, afterMisses); in ShouldNotMissCacheWithTwoParameters()
47 Assert.AreEqual(result, resultAfter); in ShouldNotMissCacheWithTwoParameters()
58 Assert.AreEqual(misses1 + 1, misses2); in ShouldNotMixParametersAndGenerators()
59 Assert.AreEqual(hits1, hits2); in ShouldNotMixParametersAndGenerators()
63 Assert.AreEqual(hits2, hits3); in ShouldNotMixParametersAndGenerators()
64 Assert.AreEqual(misses2 + 1, misses3); in ShouldNotMixParametersAndGenerators()
[all …]
DTimeSourceTests.cs45 Assert.AreEqual(roundsCount + 1, masterTimeSource.NumberOfSyncPoints); in ShouldHandleMultipleSinks()
49Assert.AreEqual(roundsCount * masterTimeSource.Quantum.Ticks, timeSinks[i].ElapsedVirtualTime.Tick… in ShouldHandleMultipleSinks()
50 Assert.AreEqual(roundsCount, timeSinks[i].NumberOfRounds); in ShouldHandleMultipleSinks()
75 Assert.IsTrue(after.TotalSeconds < roundsCount); in ShouldNotSleepOnAdvanceImmediately()
95 Assert.IsTrue(timeSource.CumulativeLoad < 0.1); in ShouldCalculateCumulativeLoadForIndefinitePerformance()
114 Assert.AreEqual(0.3, timeSource.CumulativeLoad, 0.05); in ShouldCalculateCumulativeLoadForHighPerformance()
133 Assert.AreEqual(10.0, timeSource.CumulativeLoad, 0.05); in ShouldCalculateCumulativeLoadForLowPerformance()
153 Assert.AreEqual(roundsCount + 1, timeSource.NumberOfSyncPoints); in ShouldHandleSlaveTimeSourceWithSameQuantum()
154 Assert.AreEqual(roundsCount + 1, timeSlave.NumberOfSyncPoints); in ShouldHandleSlaveTimeSourceWithSameQuantum()
155 Assert.AreEqual(roundsCount, timeSink.NumberOfRounds); in ShouldHandleSlaveTimeSourceWithSameQuantum()
[all …]
DByteArrayWithAccessTrackingTests.cs28Assert.Throws<ArgumentException>(() => new ByteArrayWithAccessTracking(new StubPeripheral(), 4, 3,… in ShouldAllowOnlyAccessWithWidthEqual4()
29Assert.Throws<ArgumentException>(() => new ByteArrayWithAccessTracking(new StubPeripheral(), 4, 2,… in ShouldAllowOnlyAccessWithWidthEqual4()
30Assert.Throws<ArgumentException>(() => new ByteArrayWithAccessTracking(new StubPeripheral(), 4, 1,… in ShouldAllowOnlyAccessWithWidthEqual4()
44 Assert.AreEqual(testArray.RetriveData(), firstWrite); in HandleAccessingInputDataThroughRegisters()
50 Assert.AreEqual(testArray.RetriveData(), secondWrite); in HandleAccessingInputDataThroughRegisters()
57 Assert.AreEqual(false, testArray.AllDataWritten); in ShouldKnowIfNotAllPartsWritten()
59 Assert.AreEqual(false, testArray.AllDataWritten); in ShouldKnowIfNotAllPartsWritten()
61 Assert.AreEqual(false, testArray.AllDataWritten); in ShouldKnowIfNotAllPartsWritten()
63 Assert.AreEqual(false, testArray.AllDataWritten); in ShouldKnowIfNotAllPartsWritten()
72 Assert.AreEqual(new byte[0], testArray.RetriveData()); in ShouldNotRetriveDataUntilAllPartsWritten()
[all …]
DRangeTests.cs25 Assert.AreEqual(rangeAt0x1000Size0x100, 0x1000.By(0x100)); in CreateRangeWithExtensions()
26 Assert.AreEqual(rangeAt0x1000Size0x100, 0x1000.To(0x10FF)); in CreateRangeWithExtensions()
29 Assert.AreEqual(oneByteRange, 0x0.By(1)); in CreateRangeWithExtensions()
30 Assert.AreEqual(oneByteRange, 0x0.To(0x0)); in CreateRangeWithExtensions()
39 Assert.Throws<RecoverableException>( in ShouldHandleCreatingRangeFromZeroToUlongMaxValue()
48 Assert.Throws<RecoverableException>( in ShouldHandleCreatingRangeWithInvalidEndAddress()
61Assert.Throws<RecoverableException>(() => new Range(startAddress, size), expectedExceptionReason); in ShouldHandleCreatingRangeWithInvalidSize()
62Assert.Throws<RecoverableException>(() => startAddress.By(size), expectedExceptionReason); in ShouldHandleCreatingRangeWithInvalidSize()
73 Assert.AreEqual(expectedResult, intersection1); in ShouldIntersectRange()
74 Assert.AreEqual(expectedResult, intersection2); in ShouldIntersectRange()
[all …]
DNullRegistrationPointPeripheralContainerTests.cs25 Assert.IsTrue(machine.IsRegistered(peripheral)); in ShouldRegisterPeripheral()
32 Assert.Throws<RegistrationException>(() => in ShouldThrowWhenSecondPeripheral()
41 Assert.IsFalse(machine.IsRegistered(peripheral)); in ShouldUnregisterPeripheral()
48 Assert.Throws<RegistrationException>(() => in ShouldThrowWhenUnregisteringNotRegisteredPeripheral()
55 Assert.Throws<RegistrationException>(() => in ShouldThrowWhenUnregisteringFromEmptyContainers()
63 Assert.AreEqual(1, container.GetRegistrationPoints(peripheral).Count()); in ShouldGetRegistrationPoints()
64Assert.AreSame(NullRegistrationPoint.Instance, container.GetRegistrationPoints(peripheral).First()… in ShouldGetRegistrationPoints()
70 Assert.IsEmpty(container.GetRegistrationPoints(peripheral)); in ShouldGetEmptyRegistrationPoints()
73 Assert.IsEmpty(container.GetRegistrationPoints(peripheral)); in ShouldGetEmptyRegistrationPoints()
80 Assert.AreEqual(1, container.GetRegistrationPoints(peripheral).Count()); in ShouldGetRegisteredPeripheralAsChildren()
[all …]
/Renode-Infrastructure-v1.15.3-29f510e/src/Emulator/Main/Tests/UnitTests/SymbolLookup/
DSymbolLookupTests.cs31 Assert.IsTrue(lookup.TryGetSymbolsByName("MoreImportant", out dummy)); in ShouldHaveMoreAndLessImportantViaName()
32 Assert.IsTrue(lookup.TryGetSymbolsByName("LessImportant", out dummy)); in ShouldHaveMoreAndLessImportantViaName()
64 Assert.AreEqual(symbols[i], lookup.GetSymbolByAddress(5)); in ShouldHaveImportantViaAddress()
67 Assert.AreEqual(symbols[i], lookup.GetSymbolByAddress(5)); in ShouldHaveImportantViaAddress()
76 Assert.AreEqual("Test", lookup.GetSymbolByAddress(0x105).Name); in ShouldFindOneSymbol()
84 Assert.AreEqual("Test", lookup.GetSymbolByAddress(0x100).Name); in ShouldFindOneSymbolBoundary()
93 Assert.IsFalse(lookup.TryGetSymbolByAddress(0x110, out dummy)); in ShouldNotFindOneSymbolBoundary()
102 Assert.IsFalse(lookup.TryGetSymbolByAddress(0x120, out dummy)); in ShouldNotFindOneSymbolMiss()
117 Assert.IsFalse(lookup.TryGetSymbolByAddress(10, out dummy)); in ShouldTrimBigSymbol()
118 Assert.AreEqual("Small", lookup.GetSymbolByAddress(9).Name); in ShouldTrimBigSymbol()
[all …]
DSymbolTests.cs27 Assert.True(symbol[0].Overlaps(symbol[1])); in ShouldOverlap()
28 Assert.True(symbol[1].Overlaps(symbol[0])); in ShouldOverlap()
29 Assert.True(symbol[2].Overlaps(symbol[1])); in ShouldOverlap()
30 Assert.True(symbol[1].Overlaps(symbol[2])); in ShouldOverlap()
31 Assert.True(symbol[2].Overlaps(symbol[3])); in ShouldOverlap()
32 Assert.True(symbol[3].Overlaps(symbol[2])); in ShouldOverlap()
33 Assert.True(symbol[3].Overlaps(symbol[4])); in ShouldOverlap()
34 Assert.True(symbol[4].Overlaps(symbol[3])); in ShouldOverlap()
47 Assert.False(symbol[0].Overlaps(symbol[4])); in ShouldNotOverlap()
48 Assert.False(symbol[4].Overlaps(symbol[0])); in ShouldNotOverlap()
[all …]
/Renode-Infrastructure-v1.15.3-29f510e/src/Emulator/Peripherals/Test/PeripheralsTests/
DSTMCANTest.cs31 Assert.AreEqual(stmcan.ReadDoubleWord(0x00), 0x00010002); in InitTest()
33 Assert.AreEqual(stmcan.ReadDoubleWord(0x04), 0x00000C02); in InitTest()
35 Assert.AreEqual(stmcan.ReadDoubleWord(0x08), 0x1C000000); in InitTest()
37 Assert.AreEqual(stmcan.ReadDoubleWord(0x0C), 0x00000000); in InitTest()
39 Assert.AreEqual(stmcan.ReadDoubleWord(0x10), 0x00000000); in InitTest()
41 Assert.AreEqual(stmcan.ReadDoubleWord(0x14), 0x00000000); in InitTest()
43 Assert.AreEqual(stmcan.ReadDoubleWord(0x18), 0x00000000); in InitTest()
45 Assert.AreEqual(stmcan.ReadDoubleWord(0x1C), 0x00000000); // Cannot read in InitTest()
50 Assert.AreEqual(stmcan.ReadDoubleWord(0x04), 0x00000C01); in InitTest()
51 Assert.AreEqual(stmcan.ReadDoubleWord(0x1C), 0x01230000); in InitTest()
[all …]
DEFM32GGI2CControllerTest.cs30 Assert.AreEqual(efm32ggi2ccontroller.ReadDoubleWord(0x00), 0); in InitTest()
33 Assert.AreEqual(efm32ggi2ccontroller.ReadDoubleWord(0x00), 0x1); in InitTest()
36 Assert.AreEqual(efm32ggi2ccontroller.ReadDoubleWord(0x28), 0); in InitTest()
38 Assert.AreEqual(efm32ggi2ccontroller.ReadDoubleWord(0x34), 0); in InitTest()
41 Assert.AreEqual(efm32ggi2ccontroller.ReadDoubleWord(0x08), 0); in InitTest()
42 Assert.AreEqual(efm32ggi2ccontroller.ReadDoubleWord(0x0C), 0); in InitTest()
43 Assert.AreEqual(efm32ggi2ccontroller.ReadDoubleWord(0x10), 0); in InitTest()
44 Assert.AreEqual(efm32ggi2ccontroller.ReadDoubleWord(0x14), 0); in InitTest()
45 Assert.AreEqual(efm32ggi2ccontroller.ReadDoubleWord(0x18), 0); in InitTest()
46 Assert.AreEqual(efm32ggi2ccontroller.ReadDoubleWord(0x1C), 0); in InitTest()
[all …]
DOpenTitan_I2C_Test.cs35Assert.AreEqual(Sensor1Id, PerformReadFromSlave(Sensor1Address, Sensor1IdOffset), "Incorrect ID fo… in ShouldPerformSimpleTransaction()
42Assert.AreEqual(Sensor1Id, PerformReadFromSlave(Sensor1Address, Sensor1IdOffset), "Incorrect ID fo… in ShouldBeAbleToDoTwoConsecutiveTransmissions()
43Assert.AreEqual(Sensor2Id, PerformReadFromSlave(Sensor2Address, Sensor2IdOffset), "Incorrect ID fo… in ShouldBeAbleToDoTwoConsecutiveTransmissions()
49Assert.AreEqual(0u, PerformReadFromSlave(Sensor1Address, Sensor1IdOffset), "Read some non-zero dat… in ShouldNotStartTransactionsUntilHostIsEnabled()
51 Assert.AreEqual(0u, ReadFromRegister(I2C.Registers.Status) & 0x04, "Fmt queue empty"); in ShouldNotStartTransactionsUntilHostIsEnabled()
53Assert.AreEqual(RxQueueEmptyMask, ReadFromRegister(I2C.Registers.Status) & RxQueueEmptyMask, "Rx q… in ShouldNotStartTransactionsUntilHostIsEnabled()
57Assert.AreEqual(0u, ReadFromRegister(I2C.Registers.Status) & RxQueueEmptyMask, "Rx queue empty"); in ShouldNotStartTransactionsUntilHostIsEnabled()
58Assert.AreEqual(Sensor1Id, ReadFromRegister(I2C.Registers.ReadData), "Incorrect data read"); in ShouldNotStartTransactionsUntilHostIsEnabled()
74Assert.AreEqual(0u, ReadFromRegister(I2C.Registers.InterruptState), "Expected no interrupts at thi… in ShouldSetExceptionOnFmtWatermark()
77Assert.AreEqual(FmtWatermarkInterruptMask, ReadFromRegister(I2C.Registers.InterruptState) & FmtWat… in ShouldSetExceptionOnFmtWatermark()
[all …]
DLPC43xx_GPIO_Test.cs31 Assert.AreEqual(gpio.ReadDoubleWord(GPIO_DIR + 4 * port), 0x00000000); in InitTest()
33 Assert.AreEqual(gpio.ReadDoubleWord(GPIO_MASK + 4 * port), 0x00000000); in InitTest()
35 Assert.AreEqual(gpio.ReadDoubleWord(GPIO_SET + 4 * port), 0x00000000); in InitTest()
54 Assert.AreEqual(gpio.ReadDoubleWord(GPIO_DIR + 4 * port), 0xFFFFFFFF); in ChangeDirectionToOutput()
56 Assert.AreEqual(gpio.ReadDoubleWord(GPIO_MASK + 4 * port), 0x00000000); in ChangeDirectionToOutput()
58 Assert.AreEqual(gpio.ReadDoubleWord(GPIO_PIN + 4 * port), 0x00000000); in ChangeDirectionToOutput()
60 Assert.AreEqual(gpio.ReadDoubleWord(GPIO_MPIN + 4 * port), 0x00000000); in ChangeDirectionToOutput()
62 Assert.AreEqual(gpio.ReadDoubleWord(GPIO_SET + 4 * port), 0x00000000); in ChangeDirectionToOutput()
82 Assert.AreEqual(gpio.ReadDoubleWord(GPIO_PIN + 4 * port), 0xFFFFFFFF); in ChangeOutputsState()
84 Assert.AreEqual(gpio.ReadDoubleWord(GPIO_SET + 4 * port), 0xFFFFFFFF); in ChangeOutputsState()
[all …]
DSHT21Test.cs35 Assert.AreEqual(serialNr[0], 0x0); in InitTest()
36 Assert.AreEqual(serialNr[1], 0x0); in InitTest()
37 Assert.AreEqual(serialNr[2], 0x0); in InitTest()
38 Assert.AreEqual(serialNr[3], 0x0); in InitTest()
39 Assert.AreEqual(serialNr[4], 0x0); in InitTest()
40 Assert.AreEqual(serialNr[5], 0x0); in InitTest()
41 Assert.AreEqual(serialNr[6], 0x0); in InitTest()
42 Assert.AreEqual(serialNr[7], 0x0); in InitTest()
43 Assert.AreEqual(serialNr[8], 0x0); in InitTest()
52 Assert.AreEqual(serialNr[0], 0x0); in InitTest()
[all …]
DBMA180Test.cs34 Assert.AreEqual(registerValue[0], 0x3); in InitTest()
43 Assert.AreEqual(registerValue[0], 0x0); in InitTest()
56 Assert.AreEqual(registerValue[0], 0x10); in InitTest()
64 Assert.AreEqual(softReset[0], 0); in InitTest()
77 Assert.AreEqual(registerValue[0], 0x0); in InitTest()
85 Assert.AreEqual(lowDur[0], 0x50); in InitTest()
93 Assert.AreEqual(highDur[0], 0x32); in InitTest()
101 Assert.AreEqual(lowTh[0], 0x17); in InitTest()
109 Assert.AreEqual(highTh[0], 0x50); in InitTest()
127 Assert.Greater(temperature[0], 0); in ReadDataTest()
[all …]
/Renode-Infrastructure-v1.15.3-29f510e/src/Emulator/Main/Tests/UnitTests/Collections/
DMultiValueDictionaryTests.cs40 Assert.IsTrue(multiDict.TryGetValue("key", out values)); in ShouldAddAndTryGetValue()
41 Assert.AreSame("value", values.First()); in ShouldAddAndTryGetValue()
48 Assert.IsTrue(multiDict.TryGetValue("key2", out values)); in ShouldAddAndTryGetValue()
62 Assert.IsFalse(multiDict.TryGetValue("海亀", out values)); in ShouldNotGetValue()
74 Assert.IsFalse(multiDict.TryGetValue("海亀", out values)); in ShouldClear()
75 Assert.IsFalse(multiDict.TryGetValue("key1", out values)); in ShouldClear()
76 Assert.IsFalse(multiDict.TryGetValue("key2", out values)); in ShouldClear()
77 Assert.IsFalse(multiDict.TryGetValue("key3", out values)); in ShouldClear()
88 Assert.IsTrue(multiDict.ContainsValue("dojpa2")); in ShouldContainValue()
89 Assert.IsTrue(multiDict.ContainsValue("海亀")); in ShouldContainValue()
[all …]

1234