This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package roman | |
| import ( | |
| "fmt" | |
| "testing" | |
| ) | |
| func TestArabic_ToRoman(t *testing.T) { | |
| testCases := []struct { | |
| in Arabic |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package roman | |
| import "fmt" | |
| type Arabic int16 | |
| type Roman string | |
| var NilRoman = Roman("nil") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include "gmock/gmock.h" | |
| #include "gtest/gtest.h" | |
| using ::testing::NiceMock; | |
| using ::testing::Return; | |
| using ::testing::_; // Matcher for parameters | |
| // 隣人 | |
| class HogeServiceClient | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include "gmock/gmock.h" | |
| #include "gtest/gtest.h" | |
| using ::testing::NiceMock; | |
| using ::testing::Return; | |
| using ::testing::_; // Matcher for parameters | |
| // 隣人 | |
| class FugaServiceClient | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import org.junit.jupiter.api.BeforeEach; | |
| import org.junit.jupiter.api.DisplayName; | |
| import org.junit.jupiter.api.Nested; | |
| import org.junit.jupiter.api.Test; | |
| import java.util.EmptyStackException; | |
| import java.util.Stack; | |
| import static org.junit.jupiter.api.Assertions.assertEquals; | |
| import static org.junit.jupiter.api.Assertions.assertThrows; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package poker; | |
| import org.junit.jupiter.api.DisplayName; | |
| import org.junit.jupiter.api.Nested; | |
| import org.junit.jupiter.api.Test; | |
| import static org.junit.jupiter.api.Assertions.assertEquals; | |
| import static poker.PokerHandHelper.highCard; | |
| import static poker.PokerHandHelper.onePair; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package poker; | |
| import java.util.ArrayList; | |
| import java.util.List; | |
| import static java.util.stream.Collectors.toList; | |
| public class Game { | |
| List<Player> players = new ArrayList(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package poker; | |
| import org.junit.jupiter.api.DisplayName; | |
| import org.junit.jupiter.api.Test; | |
| import static org.junit.jupiter.api.Assertions.assertEquals; | |
| import static poker.PokerHandHelper.*; | |
| public class PokerHandTest { | |
| @DisplayName("ワンペアならスコアは1000点(仮)であること") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import static java.util.Arrays.*; | |
| import static org.junit.jupiter.api.Assertions.*; | |
| import java.util.ArrayList; | |
| import java.util.Arrays; | |
| import java.util.List; | |
| import org.junit.jupiter.api.Test; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import xs from 'xstream'; | |
| import delay from 'xstream/extra/delay'; | |
| var refactorProxy = xs.create(); | |
| var red = refactorProxy.map((x) => 'Red:' + x).compose(delay(500)); | |
| var green = red.map((x) => x.replace(/Red/, 'GreenWithDebt')).compose(delay(500)); | |
| var refactor = green.map((x) => x.replace(/WithDebt/, '')).startWith('').compose(delay(500)); | |
| refactorProxy.imitate(refactor); | |
| red.addListener({ |