Fixed tests and merge conflicts

This commit is contained in:
Akash Yadav
2022-08-24 23:35:05 +05:30
5 changed files with 37 additions and 8 deletions
+1 -1
View File
@@ -13,7 +13,7 @@
![Repository size](https://img.shields.io/github/repo-size/itsaky/androidide)
![CodeFactor](https://www.codefactor.io/repository/github/itsaky/androidide/badge/main)
![Commit activity](https://img.shields.io/github/commit-activity/m/itsaky/AndroidIDE)
![Builds and tests](https://github.com/itsaky/AndroidIDE/actions/workflows/android_workflow.yml/badge.svg)
![Builds and tests](https://github.com/itsaky/AndroidIDE/actions/workflows/build.yml/badge.svg)
![Latest release](https://img.shields.io/github/v/release/itsaky/AndroidIDE?include_prereleases&label=latest%20release)
![Downloads from releases](https://img.shields.io/github/downloads/itsaky/AndroidIDE/total?label=Downloads%20from%20releases)
![Downloads from website](https://img.shields.io/endpoint?url=https%3A%2F%2Fandroidide.com%2Ffunctions%2Fdownloads_shield.php)
@@ -36,8 +36,8 @@ public class Symbols {
if (file.getName().endsWith(".java")
|| file.getName().endsWith(".gradle")
|| file.getName().endsWith(".kt")) return javaSymbols();
if (file.getName().endsWith(".xml")) return xmlSymbols();
else if (file.getName().endsWith(".xml")) return xmlSymbols();
else return plainTextSymbols();
}
return new Symbol[0];
@@ -99,6 +99,33 @@ public class Symbols {
};
}
public static Symbol[] plainTextSymbols() {
return new Symbol[] {
new Symbol("↹", "\t"),
new Symbol("{", "{}"),
new Symbol("}"),
new Symbol("(", "()"),
new Symbol(")"),
new Symbol("="),
new Symbol("\"", "\"\""),
new Symbol("'", "''"),
new Symbol("|"),
new Symbol("&"),
new Symbol("!"),
new Symbol("[", "[]"),
new Symbol("]"),
new Symbol("<", "<>"),
new Symbol(">"),
new Symbol("+"),
new Symbol("-"),
new Symbol("/"),
new Symbol("~"),
new Symbol("`"),
new Symbol(":"),
new Symbol("_")
};
}
public static String createTabSpaces() {
int size = EditorPreferencesKt.getTabSize();
StringBuilder tab = new StringBuilder();
@@ -20,6 +20,7 @@
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:layout_marginBottom="32dp"
android:textAlignment="center"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="@color/secondaryTextColor" />
@@ -55,11 +55,12 @@ class ResourceTableRegistryTest {
.isEqualTo(resourceTable)
resourceTable.apply {
assertThat(this.packages).hasSize(1)
this.packages.first().apply { assertThat(this.name).isEqualTo("") }
assertThat(this).isNotNull()
assertThat(this!!.packages).hasSize(1)
this.packages.first().apply { assertThat(this.name).isEqualTo("android") }
}
resourceTable.findResource(ResourceName(pck = "", type = STRING, entry = "ok")).apply {
resourceTable!!.findResource(ResourceName(pck = "android", type = STRING, entry = "ok")).apply {
assertThat(this).isNotNull()
assertThat(this!!.entry).isNotNull()
assertThat(this.entry.values).isNotEmpty()
@@ -73,7 +74,7 @@ class ResourceTableRegistryTest {
}
}
resourceTable.findResource(ResourceName(pck = "", type = STRING, entry = "cancel")).apply {
resourceTable.findResource(ResourceName(pck = "android", type = STRING, entry = "cancel")).apply {
assertThat(this).isNotNull()
assertThat(this!!.entry).isNotNull()
assertThat(this.entry.values).isNotEmpty()
@@ -88,7 +89,7 @@ class ResourceTableRegistryTest {
}
resourceTable
.findResource(ResourceName(pck = "", type = COLOR, entry = "holo_red_dark"))
.findResource(ResourceName(pck = "android", type = COLOR, entry = "holo_red_dark"))
.apply {
assertThat(this).isNotNull()
assertThat(this!!.entry).isNotNull()
Binary file not shown.