mirror of
https://github.com/konsoletyper/teavm.git
synced 2024-11-27 01:30:35 +08:00
Fix base64 support
This commit is contained in:
parent
8f58b92462
commit
5da32e3a65
@ -55,7 +55,7 @@ public class Base64 {
|
||||
|
||||
int triples = (outputSize / 3) * 3;
|
||||
i = 0;
|
||||
for (j = 0; i < triples;) {
|
||||
for (j = 0; j < triples;) {
|
||||
int a = decode(text.charAt(i++));
|
||||
int b = decode(text.charAt(i++));
|
||||
int c = decode(text.charAt(i++));
|
||||
|
@ -36,6 +36,7 @@ public class ClassLoaderTest {
|
||||
assertEquals("qwerty", loadResource("6"));
|
||||
assertEquals("qwertyu", loadResource("7"));
|
||||
assertEquals("qwertyui", loadResource("8"));
|
||||
assertEquals("qwertyuiopasdfghjklzxcvbnm", loadResource("9"));
|
||||
}
|
||||
|
||||
private static String loadResource(String name) {
|
||||
|
@ -25,7 +25,7 @@ import org.teavm.model.ListableClassReaderSource;
|
||||
public class TestResourcesSupplier implements ResourceSupplier {
|
||||
@Override
|
||||
public String[] supplyResources(ClassLoader classLoader, ListableClassReaderSource classSource) {
|
||||
String[] result = { "1", "2", "3", "4", "5", "6", "7", "8" };
|
||||
String[] result = { "1", "2", "3", "4", "5", "6", "7", "8", "9" };
|
||||
for (int i = 0; i < result.length; ++i) {
|
||||
result[i] = "resources-for-test/" + result[i];
|
||||
}
|
||||
|
1
tests/src/test/resources/resources-for-test/9
Normal file
1
tests/src/test/resources/resources-for-test/9
Normal file
@ -0,0 +1 @@
|
||||
qwertyuiopasdfghjklzxcvbnm
|
Loading…
Reference in New Issue
Block a user