mirror of
https://github.com/msgpack/msgpack-c.git
synced 2025-04-16 15:01:14 +02:00
Implement array message pack
This commit is contained in:
parent
743d69ec0b
commit
ed3ead06fe
@ -541,8 +541,8 @@ class ScalaFieldEntry(name : String) extends IFieldEntry{
|
||||
|
||||
def getJavaTypeName = {
|
||||
if(getType.isArray){
|
||||
//TODO implement here
|
||||
getType.getName()
|
||||
getType.getComponentType.getName + "[]"
|
||||
|
||||
}else{
|
||||
getType.getName()
|
||||
}
|
||||
|
@ -72,7 +72,7 @@ class BasicalTypes{
|
||||
|
||||
var dateVar : Date = null
|
||||
|
||||
|
||||
var intArray : Array[Int] = Array()
|
||||
|
||||
}
|
||||
|
||||
|
@ -51,6 +51,7 @@ class ScalaMessagePackTest extends Specification with JUnit /*with ScalaCheck*/
|
||||
v.doubleVar = 2.5
|
||||
v.strVar = "fugafuga"
|
||||
v.dateVar = new Date(1233333)
|
||||
v.intArray = Array(1,2,3,4,5)
|
||||
|
||||
val b = ScalaMessagePack.pack(v)
|
||||
val des : BasicalTypes = ScalaMessagePack.unpack[BasicalTypes](b)
|
||||
@ -63,6 +64,7 @@ class ScalaMessagePackTest extends Specification with JUnit /*with ScalaCheck*/
|
||||
des.doubleVar must be_==(v.doubleVar)
|
||||
des.strVar must be_==(v.strVar)
|
||||
des.dateVar must be_==(v.dateVar)
|
||||
des.intArray must containAll(v.intArray)
|
||||
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user