Fix more unit tests

This commit is contained in:
serso
2017-08-18 15:38:35 +02:00
parent f6e520eb56
commit f41a37fe31
12 changed files with 134 additions and 65 deletions

View File

@@ -26,6 +26,7 @@ import android.content.Context;
import android.content.SharedPreferences;
import android.support.annotation.NonNull;
import android.support.annotation.StringRes;
import android.support.annotation.VisibleForTesting;
import android.text.TextUtils;
import com.squareup.otto.Bus;
@@ -251,7 +252,8 @@ public class Engine implements SharedPreferences.OnSharedPreferenceChangeListene
editor.apply();
}
private void initAsync() {
@VisibleForTesting
void initAsync() {
init(variablesRegistry);
init(functionsRegistry);
init(operatorsRegistry);

View File

@@ -22,17 +22,19 @@
package org.solovyev.android.calculator;
import jscl.math.function.Function;
import jscl.math.function.IConstant;
import org.solovyev.android.calculator.math.MathType;
import org.solovyev.android.calculator.text.TextProcessor;
import org.solovyev.common.msg.MessageType;
import java.util.ArrayList;
import java.util.List;
import javax.annotation.Nonnull;
import javax.inject.Inject;
import javax.inject.Singleton;
import java.util.ArrayList;
import java.util.List;
import jscl.math.function.Function;
import jscl.math.function.IConstant;
@Singleton
public class ToJsclTextProcessor implements TextProcessor<PreparedExpression, String> {