Skip to content

Instantly share code, notes, and snippets.

View phellipealexandre's full-sized avatar
🎯
Focusing

Phellipe Silva phellipealexandre

🎯
Focusing
View GitHub Profile
public class IslandMatrixCalculator {
public int calculateNumberOfIslands(int[][] matrix) {
int islands = 0;
if (matrix.length == 0) return islands;
for (int i=0; i<matrix.length; i++) {
for (int j=0; j<matrix[0].length; j++) {
if (matrix[i][j] == 1) {
removeIsland(matrix, i, j);
.PHONY: app
app:
[Instrução]
disable-animations:
adb shell settings put global window_animation_scale 0
adb shell settings put global transition_animation_scale 0
adb shell settings put global animator_duration_scale 0
clear-app-data:
adb shell pm clear com.phellipesilva.coolposts
run-instrumented-tests: clear-app-data disable-animations
./gradlew connectedAndroidTest
[Comando]: [Comando dependencia 1] ... [Comando-dependencia N]
(Tab ↹)[instrução 1]
.
.
.
(Tab ↹)[instrução n]
disable-animations:
adb shell settings put global window_animation_scale 0
adb shell settings put global transition_animation_scale 0
adb shell settings put global animator_duration_scale 0
adb shell settings put global window_animation_scale 0
adb shell settings put global transition_animation_scale 0
adb shell settings put global animator_duration_scale 0
lint:
./gradlew lintCheckErrors --info
run-unit-tests:
./gradlew test
run-instrumented-tests: clear-app-data disable-animations
./gradlew connectedAndroidTest
run-all-tests: run-unit-tests build-install-app run-instrumented-tests
make disable-animations
adb shell settings put global window_animation_scale 0
adb shell settings put global transition_animation_scale 0
adb shell settings put global animator_duration_scale 0
@RunWith(AndroidJUnit4::class)
class ChangeTextBehaviorTest {
@get:Rule
var activityRule: ActivityTestRule<MainActivity> = ActivityTestRule(MainActivity::class.java)
@Test
fun changeText_sameActivity() {
onView(withId(R.id.editTextUserInput)).perform(typeText("Espresso"), closeSoftKeyboard())