-
Notifications
You must be signed in to change notification settings - Fork 80
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
20 changed files
with
58,824 additions
and
103 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
buildscript { | ||
dependencies { | ||
classpath "io.michaelrocks:paranoid-gradle-plugin:$version" | ||
} | ||
} | ||
|
||
apply plugin: 'com.android.application' | ||
apply plugin: 'kotlin-android' | ||
apply plugin: 'io.michaelrocks.paranoid' | ||
|
||
android { | ||
compileSdkVersion androidCompileSdkVersion | ||
buildToolsVersion androidBuildToolsVersion | ||
|
||
defaultConfig { | ||
applicationId "io.michaelrocks.paranoid.processor.allcharsstring" | ||
minSdkVersion androidMinSdkVersion | ||
targetSdkVersion androidTargetSdkVersion | ||
versionCode 1 | ||
versionName version | ||
|
||
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" | ||
} | ||
|
||
buildTypes { | ||
release { | ||
minifyEnabled false | ||
} | ||
} | ||
} | ||
|
||
dependencies { | ||
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlinVersion" | ||
|
||
androidTestImplementation "com.android.support.test:runner:$runnerVersion" | ||
androidTestImplementation "com.android.support.test:rules:$runnerVersion" | ||
androidTestImplementation "com.android.support.test.espresso:espresso-core:$espressoVersion" | ||
} |
41 changes: 41 additions & 0 deletions
41
...ndroidTest/java/io/michaelrocks/paranoid/processor/allcharsstring/AllCharsStringTest.java
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
/* | ||
* Copyright 2018 Michael Rozumyanskiy | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package io.michaelrocks.paranoid.processor.allcharsstring; | ||
|
||
import android.support.test.filters.LargeTest; | ||
import android.support.test.runner.AndroidJUnit4; | ||
|
||
import org.junit.Test; | ||
import org.junit.runner.RunWith; | ||
|
||
|
||
import static org.junit.Assert.assertEquals; | ||
import static org.junit.Assert.assertTrue; | ||
|
||
@RunWith(AndroidJUnit4.class) | ||
@LargeTest | ||
public class AllCharsStringTest { | ||
@Test | ||
public void testAllCharsString() { | ||
final String string = AllCharString.INSTANCE.getString(); | ||
assertTrue(string.length() == 0x10000); | ||
|
||
for (int i = 0; i < string.length(); ++i) { | ||
assertEquals(i, string.charAt(i)); | ||
} | ||
} | ||
} |
17 changes: 17 additions & 0 deletions
17
processor-tests/all-chars-string/src/main/AndroidManifest.xml
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<manifest | ||
xmlns:android="http://schemas.android.com/apk/res/android" | ||
package="io.michaelrocks.paranoid.processor.allcharsstring"> | ||
|
||
<application> | ||
|
||
<activity android:name=".MainActivity"> | ||
<intent-filter> | ||
<action android:name="android.intent.action.MAIN" /> | ||
<category android:name="android.intent.category.LAUNCHER" /> | ||
</intent-filter> | ||
</activity> | ||
|
||
</application> | ||
|
||
</manifest> |
34 changes: 34 additions & 0 deletions
34
...s-string/src/main/java/io/michaelrocks/paranoid/processor/allcharsstring/AllCharString.kt
Large diffs are not rendered by default.
Oops, something went wrong.
21 changes: 21 additions & 0 deletions
21
...rs-string/src/main/java/io/michaelrocks/paranoid/processor/allcharsstring/MainActivity.kt
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
/* | ||
* Copyright 2018 Michael Rozumyanskiy | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package io.michaelrocks.paranoid.processor.allcharsstring | ||
|
||
import android.app.Activity | ||
|
||
class MainActivity : Activity() |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
buildscript { | ||
dependencies { | ||
classpath "io.michaelrocks:paranoid-gradle-plugin:$version" | ||
} | ||
} | ||
|
||
apply plugin: 'com.android.application' | ||
apply plugin: 'kotlin-android' | ||
apply plugin: 'io.michaelrocks.paranoid' | ||
|
||
android { | ||
compileSdkVersion androidCompileSdkVersion | ||
buildToolsVersion androidBuildToolsVersion | ||
|
||
defaultConfig { | ||
applicationId "io.michaelrocks.paranoid.processor.loadsofstrings" | ||
minSdkVersion androidMinSdkVersion | ||
targetSdkVersion androidTargetSdkVersion | ||
versionCode 1 | ||
versionName version | ||
|
||
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" | ||
} | ||
|
||
buildTypes { | ||
release { | ||
minifyEnabled false | ||
} | ||
} | ||
} | ||
|
||
dependencies { | ||
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlinVersion" | ||
|
||
androidTestImplementation "com.android.support.test:runner:$runnerVersion" | ||
androidTestImplementation "com.android.support.test:rules:$runnerVersion" | ||
androidTestImplementation "com.android.support.test.espresso:espresso-core:$espressoVersion" | ||
} |
61 changes: 61 additions & 0 deletions
61
...ndroidTest/java/io/michaelrocks/paranoid/processor/loadsofstrings/LoadsOfStringsTest.java
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
/* | ||
* Copyright 2018 Michael Rozumyanskiy | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package io.michaelrocks.paranoid.processor.loadsofstrings; | ||
|
||
import android.support.test.filters.LargeTest; | ||
import android.support.test.runner.AndroidJUnit4; | ||
|
||
import org.junit.Test; | ||
import org.junit.runner.RunWith; | ||
|
||
|
||
import static org.junit.Assert.assertFalse; | ||
|
||
@RunWith(AndroidJUnit4.class) | ||
@LargeTest | ||
public class LoadsOfStringsTest { | ||
@Test | ||
public void testLoadsOfStrings() { | ||
assertFalse(LoadsOfStrings.A.INSTANCE.getStrings().length == 0); | ||
assertFalse(LoadsOfStrings.B.INSTANCE.getStrings().length == 0); | ||
assertFalse(LoadsOfStrings.C.INSTANCE.getStrings().length == 0); | ||
assertFalse(LoadsOfStrings.D.INSTANCE.getStrings().length == 0); | ||
assertFalse(LoadsOfStrings.E.INSTANCE.getStrings().length == 0); | ||
assertFalse(LoadsOfStrings.F.INSTANCE.getStrings().length == 0); | ||
assertFalse(LoadsOfStrings.G.INSTANCE.getStrings().length == 0); | ||
assertFalse(LoadsOfStrings.H.INSTANCE.getStrings().length == 0); | ||
assertFalse(LoadsOfStrings.I.INSTANCE.getStrings().length == 0); | ||
assertFalse(LoadsOfStrings.J.INSTANCE.getStrings().length == 0); | ||
assertFalse(LoadsOfStrings.K.INSTANCE.getStrings().length == 0); | ||
assertFalse(LoadsOfStrings.L.INSTANCE.getStrings().length == 0); | ||
assertFalse(LoadsOfStrings.M.INSTANCE.getStrings().length == 0); | ||
assertFalse(LoadsOfStrings.N.INSTANCE.getStrings().length == 0); | ||
assertFalse(LoadsOfStrings.O.INSTANCE.getStrings().length == 0); | ||
assertFalse(LoadsOfStrings.P.INSTANCE.getStrings().length == 0); | ||
assertFalse(LoadsOfStrings.Q.INSTANCE.getStrings().length == 0); | ||
assertFalse(LoadsOfStrings.R.INSTANCE.getStrings().length == 0); | ||
assertFalse(LoadsOfStrings.S1.INSTANCE.getStrings().length == 0); | ||
assertFalse(LoadsOfStrings.S2.INSTANCE.getStrings().length == 0); | ||
assertFalse(LoadsOfStrings.T.INSTANCE.getStrings().length == 0); | ||
assertFalse(LoadsOfStrings.U.INSTANCE.getStrings().length == 0); | ||
assertFalse(LoadsOfStrings.V.INSTANCE.getStrings().length == 0); | ||
assertFalse(LoadsOfStrings.W.INSTANCE.getStrings().length == 0); | ||
assertFalse(LoadsOfStrings.X.INSTANCE.getStrings().length == 0); | ||
assertFalse(LoadsOfStrings.Y.INSTANCE.getStrings().length == 0); | ||
assertFalse(LoadsOfStrings.Z.INSTANCE.getStrings().length == 0); | ||
} | ||
} |
17 changes: 17 additions & 0 deletions
17
processor-tests/loads-of-strings/src/main/AndroidManifest.xml
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<manifest | ||
xmlns:android="http://schemas.android.com/apk/res/android" | ||
package="io.michaelrocks.paranoid.processor.loadsofstrings"> | ||
|
||
<application> | ||
|
||
<activity android:name=".MainActivity"> | ||
<intent-filter> | ||
<action android:name="android.intent.action.MAIN" /> | ||
<category android:name="android.intent.category.LAUNCHER" /> | ||
</intent-filter> | ||
</activity> | ||
|
||
</application> | ||
|
||
</manifest> |
Oops, something went wrong.