Restore more formatting

This commit is contained in:
Bart Sopers 2020-05-04 23:52:51 +02:00
parent 1bdc474b51
commit e7fe05dbeb
20 changed files with 36 additions and 56 deletions

View file

@ -36,4 +36,4 @@ public class NonOverlappingIntervals<T extends Interval> extends Intervals<T> {
return null;
}
}
}

View file

@ -373,4 +373,4 @@ abstract class PluginsModule {
@Qualifier
annotation class APS
}
}

View file

@ -22,4 +22,4 @@ class BTReceiver : DaggerBroadcastReceiver() {
rxBus.send(EventBTChange(EventBTChange.Change.DISCONNECT, deviceName = device.name, deviceAddress = device.address))
}
}
}
}

View file

@ -473,4 +473,4 @@
</PreferenceCategory>
</androidx.preference.PreferenceScreen>
</androidx.preference.PreferenceScreen>

View file

@ -199,4 +199,4 @@ class APSResultTest : TestBaseWithProfile() {
`when`(virtualPumpPlugin.pumpDescription).thenReturn(pumpDescription)
`when`(profileFunction.getProfile()).thenReturn(validProfile)
}
}
}

View file

@ -45,4 +45,4 @@ class ConfigBuilderPluginTest : TestBase() {
fun prepareMock() {
configBuilderPlugin = ConfigBuilderPlugin(injector, aapsLogger, resourceHelper, sp, RxBusWrapper(), activePlugin)
}
}
}

View file

@ -71,4 +71,4 @@ class AutomationEventTest : TestBase() {
Assert.assertFalse(event.actions === clone.actions) // not the same object reference
Assert.assertEquals(clone.toJSON(), clone.toJSON())
}
}
}

View file

@ -95,4 +95,4 @@ open class ActionsTestBase : TestBaseWithProfile() {
}
}
}
}

View file

@ -40,4 +40,4 @@ class MessageHashTableRTest : DanaRTestBase() {
val testMessage = messageHashTable.findMessage(0x41f2)
Assert.assertEquals("CMD_HISTORY_ALL", testMessage.messageName)
}
}
}

View file

@ -33,4 +33,4 @@ class MsgInitConnStatusTimeTest : DanaRTestBase() {
packet.handleMessage(createArray(15, 1.toByte()))
Assert.assertEquals(true, packet.failed)
}
}
}

View file

@ -29,4 +29,4 @@ class MsgStatusTempBasalTest : DanaRTestBase() {
packet.handleMessage(createArray(34, 2.toByte()))
Assert.assertEquals(false, danaRPump.isTempBasalInProgress)
}
}
}

View file

@ -36,4 +36,4 @@ class MessageHashTableRKoreanTest : DanaRSTestBase() {
val testMessage = messageHashTable.findMessage(0x41f2)
Assert.assertEquals("CMD_HISTORY_ALL", testMessage.messageName)
}
}
}

View file

@ -33,4 +33,4 @@ class DanaRSMessageHashTableTest : DanaRSTestBase() {
val testPacket: DanaRS_Packet = danaRSMessageHashTable.findMessage(forTesting.command)
Assert.assertEquals(BleCommandUtil.DANAR_PACKET__OPCODE__APS_SET_EVENT_HISTORY.toLong(), testPacket.getOpCode().toLong())
}
}
}

View file

@ -57,4 +57,4 @@ open class DanaRSTestBase : TestBaseWithProfile() {
fun setup() {
danaRPump = DanaRPump(aapsLogger, sp, injector)
}
}
}

View file

@ -58,4 +58,4 @@ class DanaRS_Packet_APS_History_EventsTest : DanaRSTestBase() {
ret[5] = (cal[Calendar.SECOND] and 0xff).toByte()
return ret
}
}
}

View file

@ -51,4 +51,4 @@ class MessageHashTable_rv2Test : DanaRTestBase() {
messageHashTableRv2.put(testMessage)
Assert.assertEquals(0xE005, messageHashTableRv2.findMessage(0xE005).command.toLong())
}
}
}

View file

@ -35,4 +35,4 @@ class MsgCheckValue_v2Test : DanaRTestBase() {
packet.handleMessage(createArray(34, 3.toByte()))
Assert.assertEquals(DanaRPump.EXPORT_MODEL, danaRPump.model)
}
}
}

View file

@ -36,4 +36,4 @@ class MsgHistoryEvents_v2Test : DanaRTestBase() {
packet.handleMessage(array)
Assert.assertEquals(false, danaRv2Plugin.eventsLoadingDone)
}
}
}

View file

@ -38,24 +38,4 @@ public class MedtronicConverterUTest {
// byte[] data = new byte[] { 00 03 00 05 01 00 C8 00 A0 01 01 00 01 00 00 64 01 05 00 14 00 64 01 00 00 };
}
*/
//@Test
public void testLocale() {
Locale l = new Locale("en", "IE");
Locale.setDefault(l);
Date date = new Date();
System.out.println("Date: toLocaleString: " + date.toLocaleString());
System.out.println("Date: toString: " + date.toString());
System.out.println("Date: toGMTString: " + date.toGMTString());
for (String isoCountry : Locale.getISOCountries()) {
//System.out.println("ISO country: " + isoCountry);
}
}
}

View file

@ -34,7 +34,7 @@ public class MedtronicPumpHistoryDecoderUTest {
// @Test
public void decodeRecord() throws Exception {
byte[] data = new byte[]{0x07, 0x00, 0x00, 0x05, (byte) 0xFA, (byte) 0xBF, 0x12};
byte[] data = new byte[] { 0x07, 0x00, 0x00, 0x05, (byte)0xFA, (byte)0xBF, 0x12 };
PumpHistoryEntryType entryType = PumpHistoryEntryType.getByCode(0x07);
@ -51,7 +51,7 @@ public class MedtronicPumpHistoryDecoderUTest {
// @Test
public void decodeLowAmount() {
byte[] data = new byte[]{52, -12, 22, -81, 46, 3, 19};
byte[] data = new byte[] { 52, -12, 22, -81, 46, 3, 19 };
PumpHistoryEntryGroup.doNotTranslate = true;
PumpHistoryEntryType entryType = PumpHistoryEntryType.getByCode(52);
@ -74,15 +74,15 @@ public class MedtronicPumpHistoryDecoderUTest {
// Data=0x6D 0xA1 0x92 0x05 0x0C 0x00 0xE8 0x00 0x00 0x00 0x00 0x04 0x0A 0x04 0x0A 0x64 0x00 0x00 0x00 0x00 0x00
// 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x0C 0x00 0xE8 0x00 0x00
// 0x00}]
byte[] data4443 = new byte[]{
0x6D, (byte) 0xA1, (byte) 0x92, 0x05, 0x0C, 0x00, (byte) 0xE8, 0x00, 0x00, 0x00, 0x00, 0x04, 0x0A, 0x04, 0x0A,
0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x00, (byte) 0xE8, 0x00, 0x00, 0x00};
byte[] data4443 = new byte[] {
0x6D, (byte)0xA1, (byte)0x92, 0x05, 0x0C, 0x00, (byte)0xE8, 0x00, 0x00, 0x00, 0x00, 0x04, 0x0A, 0x04, 0x0A,
0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x00, (byte)0xE8, 0x00, 0x00, 0x00 };
byte[] data = new byte[]{
0x6D, (byte) 0xA2, (byte) 0x92, 0x05, 0x0C, 0x00, (byte) 0xE8, 0x00, 0x00, 0x00, 0x00, 0x03, 0x18, 0x02,
(byte) 0xD4, 0x5B, 0x00, 0x44, 0x09, 0x00, 0x00, 0x00, 0x44, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x44, 0x64, 0x01, 0x00, 0x00, 0x00, 0x01, 0x0C, 0x00, (byte) 0xE8, 0x00, 0x00, 0x00};
byte[] data = new byte[] {
0x6D, (byte)0xA2, (byte)0x92, 0x05, 0x0C, 0x00, (byte)0xE8, 0x00, 0x00, 0x00, 0x00, 0x03, 0x18, 0x02,
(byte)0xD4, 0x5B, 0x00, 0x44, 0x09, 0x00, 0x00, 0x00, 0x44, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x44, 0x64, 0x01, 0x00, 0x00, 0x00, 0x01, 0x0C, 0x00, (byte)0xE8, 0x00, 0x00, 0x00 };
// basal 18.1, bolus 1.7 manual = 1.7
// All (bg low hi, number Bgs, Sen Lo/Hi, Sens Cal/Data, Basal, Bolus, Carbs, Fodd, Corr, Manual=1.7, food/corr,
@ -96,8 +96,8 @@ public class MedtronicPumpHistoryDecoderUTest {
public void decodeDailyTotals515() {
byte[] data = ByteUtil
.createByteArrayFromHexString("0x6C 0x17 0x93 0x06 0x08 0x00 0x2B 0x00 0x00 0x00 0x00 0x04 0x24 0x03 0x7C 0x54 0x00 0xA8 0x10 0x00 0x00 0x00 0xA8 0x10"
+ " 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0xA8 0x64 0x03 0x00 0x00");
.createByteArrayFromHexString("0x6C 0x17 0x93 0x06 0x08 0x00 0x2B 0x00 0x00 0x00 0x00 0x04 0x24 0x03 0x7C 0x54 0x00 0xA8 0x10 0x00 0x00 0x00 0xA8 0x10"
+ " 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0xA8 0x64 0x03 0x00 0x00");
// 0x6C 0x17 0x93 0x06 0x08 0x00 0x2B 0x00 0x00 0x00 0x00 0x04 0x24 0x03 0x7C 0x54 0x00 0xA8 0x10 0x00 0x00 0x00
// 0xA8 0x10
@ -116,11 +116,11 @@ public class MedtronicPumpHistoryDecoderUTest {
// @Test
public void decodeDailyTotals523() {
byte[] data = new byte[]{
0x6E, (byte) 0xB1, (byte) 0x92, 0x05, 0x00, (byte) 0x80, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, (byte) 0x9A, 0x00,
0x50, 0x34, 0x00, 0x4A, 0x30, 0x00, 0x0B, 0x00, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x26, 0x01, 0x00, 0x00,
0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, (byte) 0x80, (byte) 0x80, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00};
byte[] data = new byte[] {
0x6E, (byte)0xB1, (byte)0x92, 0x05, 0x00, (byte)0x80, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, (byte)0x9A, 0x00,
0x50, 0x34, 0x00, 0x4A, 0x30, 0x00, 0x0B, 0x00, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x26, 0x01, 0x00, 0x00,
0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, (byte)0x80, (byte)0x80, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00 };
// Carbs=11, total=3.850,basal=2.000, bolus=1.850, basal 52%, blus=48%, Manual=0.95, #manual=5,
// Food only=0.9, #Food Only=1,Corr Only =0, #Corr only=0,Food+Corr=0
@ -153,4 +153,4 @@ public class MedtronicPumpHistoryDecoderUTest {
}
*/
}
}