public void Test_MinValue_increment() { // Arrange var a = new Byte2(short.MinValue); // Act var byteResult = Arithmetics.Increment(a); // Assert byteResult.ToInt16().Should().Be(short.MinValue + 1); }
public void Test_0_increment() { // Arrange var a = new Byte2(0); // Act var byteResult = Arithmetics.Increment(a); // Assert byteResult.ToInt16().Should().Be(1); }
public Byte2 Do(bool store, Byte2 data, bool clock) { var invertedClock = Gates.Invert(clock); incremented = Arithmetics.Increment(registeredOutput); _selectedData = Select16.Do(store, data, incremented); registeredOutput = register.Do(invertedClock, _selectedData, clock); return(registeredOutput); }