v0.8.2 #80

Open
altavir wants to merge 63 commits from dev into master
3 changed files with 25 additions and 1 deletions
Showing only changes of commit a720b63d70 - Show all commits

View File

@ -8,7 +8,7 @@ plugins {
allprojects {
group = "space.kscience"
version = "0.8.1"
version = "0.8.2"
}
subprojects {

View File

@ -128,6 +128,10 @@ public interface MutableMeta : Meta, MutableMetaProvider {
setValue(Name.parse(this), array.asValue())
}
public infix fun String.put(array: ByteArray) {
setValue(Name.parse(this), array.asValue())
}
public infix fun String.put(repr: MetaRepr) {
set(Name.parse(this), repr.toMeta())
}

View File

@ -1,4 +1,24 @@
package space.kscience.dataforge.values
import space.kscience.dataforge.meta.DoubleArrayValue
import space.kscience.dataforge.meta.Meta
import space.kscience.dataforge.meta.doubleArray
import space.kscience.dataforge.meta.get
import kotlin.test.Test
import kotlin.test.assertEquals
import kotlin.test.assertTrue
class DoubleArrayValue {
@Test
fun doubleArrayWriteRead(){
val meta = Meta{
"doubleArray" put doubleArrayOf(1.0,2.0,3.0)
}
assertTrue {
meta["doubleArray"]?.value is DoubleArrayValue
}
assertEquals(2.0, meta["doubleArray"].doubleArray?.get(1))
}
}