Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save yohey03518/289627c3cdb4e854f49035d21a70c4e6 to your computer and use it in GitHub Desktop.
Save yohey03518/289627c3cdb4e854f49035d21a70c4e6 to your computer and use it in GitHub Desktop.
LeetCode_Algorithms_2_Add_Two_Numbers_TestCase2
[TestMethod]
public void OneDigit_AddOneDigit_ReturnValueGreaterThan10_3_Plus_9_Equal12()
{
No2_AddTwoNumbers.ListNode firstNumber = new No2_AddTwoNumbers.ListNode(3);
No2_AddTwoNumbers.ListNode secondNumber = new No2_AddTwoNumbers.ListNode(9);
No2_AddTwoNumbers.ListNode result = solution.AddTwoNumbers(firstNumber, secondNumber);
// result should be 12, first digit in linked list is 2, the second digit is 1
Assert.AreEqual(2, result.val);
Assert.AreEqual(1, result.next.val);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment