Welcome to mirror list, hosted at ThFree Co, Russian Federation.

test_blobmsg_types.t « cram « tests - git.openwrt.org/project/libubox.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 190e1f25c0ee37012419e4271ca27468070f0234 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
check that blobmsg is producing expected results:

  $ [ -n "$TEST_BIN_DIR" ] && export PATH="$TEST_BIN_DIR:$PATH"

  $ valgrind --quiet --leak-check=full test-blobmsg-types
  [*] blobmsg dump:
  string: Hello, world!
  int64_max: 9223372036854775807
  int64_min: -9223372036854775808
  int32_max: 2147483647
  int32_min: -2147483648
  int16_max: 32767
  int16_min: -32768
  int8_max: 127
  int8_min: -128
  double_max: 1.797693e+308
  double_min: 2.225074e-308
  [*] blobmsg dump cast_u64:
  string: Hello, world!
  int64_max: 9223372036854775807
  int64_min: 9223372036854775808
  int32_max: 2147483647
  int32_min: 2147483648
  int16_max: 32767
  int16_min: 32768
  int8_max: 127
  int8_min: 128
  double_max: 1.797693e+308
  double_min: 2.225074e-308
  [*] blobmsg dump cast_s64:
  string: Hello, world!
  int64_max: 9223372036854775807
  int64_min: -9223372036854775808
  int32_max: 2147483647
  int32_min: -2147483648
  int16_max: 32767
  int16_min: -32768
  int8_max: 127
  int8_min: -128
  double_max: 1.797693e+308
  double_min: 2.225074e-308
  
  [*] blobmsg to json: {"string":"Hello, world!","int64_max":9223372036854775807,"int64_min":-9223372036854775808,"int32_max":2147483647,"int32_min":-2147483648,"int16_max":32767,"int16_min":-32768,"int8_max":true,"int8_min":true,"double_max":179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368.000000,"double_min":0.000000}
  
  [*] blobmsg from json:
  string: Hello, world!
  int64_max: 9223372036854775807
  int64_min: -9223372036854775808
  int32_max: 2147483647
  int32_min: -2147483648
  int16_max: 32767
  int16_min: -32768
  int8_max: 1
  int8_min: 1
  double_max: 1.797693e+308
  double_min: 0.000000e+00
  
  [*] blobmsg from json/cast_u64:
  string: Hello, world!
  int64_max: 9223372036854775807
  int64_min: 9223372036854775808
  int32_max: 2147483647
  int32_min: 2147483648
  int16_max: 32767
  int16_min: 4294934528
  int8_max: 1
  int8_min: 1
  double_max: 1.797693e+308
  double_min: 0.000000e+00
  
  [*] blobmsg from json/cast_s64:
  string: Hello, world!
  int64_max: 9223372036854775807
  int64_min: -9223372036854775808
  int32_max: 2147483647
  int32_min: -2147483648
  int16_max: 32767
  int16_min: -32768
  int8_max: 1
  int8_min: 1
  double_max: 1.797693e+308
  double_min: 0.000000e+00