mirror of
https://gitee.com/zhangsken/AndroidIDE.git
synced 2026-10-16 07:49:44 +08:00
Fixed tests and merge conflicts
This commit is contained in:
@@ -13,7 +13,7 @@
|
||||

|
||||

|
||||

|
||||

|
||||

|
||||

|
||||

|
||||

|
||||
|
||||
@@ -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" />
|
||||
|
||||
|
||||
+6
-5
@@ -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.
Reference in New Issue
Block a user