()
| 13 | } |
| 14 | |
| 15 | func getEggDroppingTestCases() []testCaseEggDropping { |
| 16 | return []testCaseEggDropping{ |
| 17 | {1, 10, 10}, // One egg, need to test all floors |
| 18 | {2, 10, 4}, // Two eggs and ten floors |
| 19 | {3, 14, 4}, // Three eggs and fourteen floors |
| 20 | {2, 36, 8}, // Two eggs and thirty-six floors |
| 21 | {2, 0, 0}, // Two eggs, zero floors |
| 22 | } |
| 23 | |
| 24 | } |
| 25 | |
| 26 | func TestEggDropping(t *testing.T) { |
| 27 | t.Run("Egg Dropping test cases", func(t *testing.T) { |