[DEV] update aknot
This commit is contained in:
parent
137c707eb5
commit
a1f571173b
6
.project
6
.project
@ -6,6 +6,11 @@
|
||||
<project>atriasoft-ejson</project>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.python.pydev.PyDevBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||
<arguments>
|
||||
@ -20,6 +25,7 @@
|
||||
<natures>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
<nature>net.sf.eclipsecs.core.CheckstyleNature</nature>
|
||||
<nature>org.python.pydev.pythonNature</nature>
|
||||
</natures>
|
||||
<filteredResources>
|
||||
<filter>
|
||||
|
@ -166,11 +166,7 @@ public class GeneratorGeneric {
|
||||
}
|
||||
}
|
||||
}
|
||||
if (oneLine) {
|
||||
data.append("{");
|
||||
} else {
|
||||
data.append("{\n");
|
||||
}
|
||||
final Iterator<Map.Entry<String, JsonNode>> iterator = tmp.entrySet().iterator();
|
||||
while (iterator.hasNext()) {
|
||||
final Map.Entry<String, JsonNode> entry = iterator.next();
|
||||
@ -184,11 +180,6 @@ public class GeneratorGeneric {
|
||||
if (iterator.hasNext()) {
|
||||
data.append(",");
|
||||
}
|
||||
if (oneLine) {
|
||||
data.append(" ");
|
||||
} else {
|
||||
data.append("\n");
|
||||
}
|
||||
}
|
||||
if (!oneLine) {
|
||||
Tools.addIndent(data, indent - 1);
|
||||
|
@ -9,7 +9,7 @@ import org.atriasoft.ejson.Ejson;
|
||||
import org.atriasoft.ejson.model.JsonNode;
|
||||
import org.junit.jupiter.api.Assertions;
|
||||
|
||||
import test.atriasoft.ejson.internal.Log;
|
||||
import sample.atriasoft.ewol.validationWidget.Log;
|
||||
|
||||
class EjsonLocal {
|
||||
// errorPos : -1 : no error , 1 : parsing error, 2 generation error, 3 comparaison error ????
|
||||
|
@ -8,7 +8,7 @@ package test.atriasoft.ejson.generic;
|
||||
import org.junit.jupiter.api.BeforeAll;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import test.atriasoft.ejson.internal.Log;
|
||||
import sample.atriasoft.ewol.validationWidget.Log;
|
||||
|
||||
public class EjsonTestAll {
|
||||
//@formatter:off
|
||||
|
@ -9,7 +9,7 @@ import org.junit.jupiter.api.BeforeAll;
|
||||
import org.junit.jupiter.api.Order;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import test.atriasoft.ejson.internal.Log;
|
||||
import sample.atriasoft.ewol.validationWidget.Log;
|
||||
|
||||
public class EjsonTestBoolean {
|
||||
private static String refOutputBoolean1 = "{\n\t\"tmpElement\": true\n}";
|
||||
|
@ -9,7 +9,7 @@ import org.junit.jupiter.api.BeforeAll;
|
||||
import org.junit.jupiter.api.Order;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import test.atriasoft.ejson.internal.Log;
|
||||
import sample.atriasoft.ewol.validationWidget.Log;
|
||||
|
||||
public class EjsonTestNull {
|
||||
private static final String REF_OUTPUT_NULL = "{\n\t\"tmpElement\": null\n}";
|
||||
|
@ -9,7 +9,7 @@ import org.junit.jupiter.api.BeforeAll;
|
||||
import org.junit.jupiter.api.Order;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import test.atriasoft.ejson.internal.Log;
|
||||
import sample.atriasoft.ewol.validationWidget.Log;
|
||||
|
||||
public class EjsonTestNumber {
|
||||
private static final String REF_OUTPUT_NUMBER = "{\n\t\"tmpElement\": 956256\n}";
|
||||
|
@ -1,73 +0,0 @@
|
||||
/** @file
|
||||
* @author Edouard DUPIN
|
||||
* @copyright 2021, Edouard DUPIN, all right reserved
|
||||
* @license MPL v2.0 (see license file)
|
||||
*/
|
||||
package test.atriasoft.ejson.internal;
|
||||
|
||||
import io.scenarium.logger.LogLevel;
|
||||
import io.scenarium.logger.Logger;
|
||||
|
||||
public class Log {
|
||||
private static final String LIB_NAME = "ejson-test";
|
||||
private static final String LIB_NAME_DRAW = Logger.getDrawableName(LIB_NAME);
|
||||
private static final boolean PRINT_CRITICAL = Logger.getNeedPrint(LIB_NAME, LogLevel.CRITICAL);
|
||||
private static final boolean PRINT_ERROR = Logger.getNeedPrint(LIB_NAME, LogLevel.ERROR);
|
||||
private static final boolean PRINT_WARNING = Logger.getNeedPrint(LIB_NAME, LogLevel.WARNING);
|
||||
private static final boolean PRINT_INFO = Logger.getNeedPrint(LIB_NAME, LogLevel.INFO);
|
||||
private static final boolean PRINT_DEBUG = Logger.getNeedPrint(LIB_NAME, LogLevel.DEBUG);
|
||||
private static final boolean PRINT_VERBOSE = Logger.getNeedPrint(LIB_NAME, LogLevel.VERBOSE);
|
||||
private static final boolean PRINT_TODO = Logger.getNeedPrint(LIB_NAME, LogLevel.TODO);
|
||||
private static final boolean PRINT_PRINT = Logger.getNeedPrint(LIB_NAME, LogLevel.PRINT);
|
||||
|
||||
public static void critical(final String data, final Object... objects) {
|
||||
if (PRINT_CRITICAL) {
|
||||
Logger.critical(LIB_NAME_DRAW, data, objects);
|
||||
}
|
||||
}
|
||||
|
||||
public static void debug(final String data, final Object... objects) {
|
||||
if (PRINT_DEBUG) {
|
||||
Logger.debug(LIB_NAME_DRAW, data, objects);
|
||||
}
|
||||
}
|
||||
|
||||
public static void error(final String data, final Object... objects) {
|
||||
if (PRINT_ERROR) {
|
||||
Logger.error(LIB_NAME_DRAW, data, objects);
|
||||
}
|
||||
}
|
||||
|
||||
public static void info(final String data, final Object... objects) {
|
||||
if (PRINT_INFO) {
|
||||
Logger.info(LIB_NAME_DRAW, data, objects);
|
||||
}
|
||||
}
|
||||
|
||||
public static void print(final String data, final Object... objects) {
|
||||
if (PRINT_PRINT) {
|
||||
Logger.print(LIB_NAME_DRAW, data, objects);
|
||||
}
|
||||
}
|
||||
|
||||
public static void todo(final String data, final Object... objects) {
|
||||
if (PRINT_TODO) {
|
||||
Logger.todo(LIB_NAME_DRAW, data, objects);
|
||||
}
|
||||
}
|
||||
|
||||
public static void verbose(final String data, final Object... objects) {
|
||||
if (PRINT_VERBOSE) {
|
||||
Logger.verbose(LIB_NAME_DRAW, data, objects);
|
||||
}
|
||||
}
|
||||
|
||||
public static void warning(final String data, final Object... objects) {
|
||||
if (PRINT_WARNING) {
|
||||
Logger.warning(LIB_NAME_DRAW, data, objects);
|
||||
}
|
||||
}
|
||||
|
||||
private Log() {}
|
||||
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user