Developing lightweight computation at the DSG edge

Commit 903a8c95 authored by Roger Pueyo Centelles's avatar Roger Pueyo Centelles
Browse files

[goclidote-demo] Update demo3


Signed-off-by: Roger Pueyo Centelles's avatarRoger Pueyo Centelles <rpueyo@ac.upc.edu>
parent 6aa0b8a2
......@@ -43,22 +43,25 @@ func main() {
fmt.Println("(1)")
for _, expected := range []antidoteclient.MapEntryKey{
{[]byte("counter"), antidoteclient.CRDTType_COUNTER},
{[]byte("reg"), antidoteclient.CRDTType_LWWREG},
{[]byte("set"), antidoteclient.CRDTType_ORSET},
} {
found := false
for _, entry := range keyList {
fmt.Println(string(entry.Key))
for k, entry := range keyList {
fmt.Print(k)
fmt.Print(": ")
fmt.Println(string(entry.Key))
for _, expected := range []antidoteclient.MapEntryKey{
{[]byte("counter"), antidoteclient.CRDTType_COUNTER},
{[]byte("reg"), antidoteclient.CRDTType_LWWREG},
{[]byte("set"), antidoteclient.CRDTType_ORSET},
} {
found := false
if bytes.Equal(entry.Key, expected.Key) && entry.CrdtType == expected.CrdtType {
found = true
fmt.Println("a")
break
}
}
if !found {
fmt.Sprintln("expected value %s not found in result (%s)", expected.Key, keyList)
if !found {
fmt.Sprintln("expected value %s not found in result (%s)", expected.Key, keyList)
}
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment