// Path: src/main/java/org/picofarad/sdr101/blocks/sources/ByteArraySource.java
// public class ByteArraySource implements SignalBlock {
//     byte[] input;
//     int highIndex;
//     int lowIndex;
// 
//     public ByteArraySource(byte[] b, int h, int l) {
//         input = b;
//         highIndex = h;
//         lowIndex = l;
//     }
// 
//     public void setHighIndex(int i) {
//         highIndex = i;
//     }
// 
//     public void setLowIndex(int i) {
//         lowIndex = i;
//     }
// 
//     public double output() {
//         short s = (short) ((input[highIndex] << 8) | (input[lowIndex] & 0xFF));
//         double d = s / Short.MAX_VALUE;
// 
//         return d;
//     }
// }


import org.junit.Assert;
import org.junit.Test;
import org.picofarad.sdr101.blocks.sources.ByteArraySource;
/* sdr101-java
 * Simple software-defined radio for Java.
 *
 * (c) Karl-Martin Skontorp <kms@skontorp.net> ~ http://22pf.org/
 * Licensed under the GNU GPL 2.0 or later.
 */

package org.picofarad.sdr101.blocks;


public class ByteArraySourceTest {
    @Test
    public void testOutput() {
        byte[] b = new byte[4];
// Path: src/main/java/org/picofarad/sdr101/blocks/sources/ByteArraySource.java
// public class ByteArraySource implements SignalBlock {
//     byte[] input;
//     int highIndex;
//     int lowIndex;
// 
//     public ByteArraySource(byte[] b, int h, int l) {
//         input = b;
//         highIndex = h;
//         lowIndex = l;
//     }
// 
//     public void setHighIndex(int i) {
//         highIndex = i;
//     }
// 
//     public void setLowIndex(int i) {
//         lowIndex = i;
//     }
// 
//     public double output() {
//         short s = (short) ((input[highIndex] << 8) | (input[lowIndex] & 0xFF));
//         double d = s / Short.MAX_VALUE;
// 
//         return d;
//     }
// }


// Path: src/test/java/org/picofarad/sdr101/blocks/ByteArraySourceTest.java
import org.junit.Assert;
import org.junit.Test;
import org.picofarad.sdr101.blocks.sources.ByteArraySource;

/* sdr101-java
 * Simple software-defined radio for Java.
 *
 * (c) Karl-Martin Skontorp <kms@skontorp.net> ~ http://22pf.org/
 * Licensed under the GNU GPL 2.0 or later.
 */

package org.picofarad.sdr101.blocks;


public class ByteArraySourceTest {
    @Test
    public void testOutput() {
        byte[] b = new byte[4];
        ByteArraySource bas = new ByteArraySource(b, 0, 1);