bt_assert("abcd".append(format(1234)) = "abcd1234");
bt_assert(append("He", "llo") = st);
bt_assert("Hello" ++ " " ++ "world" = "Hello world");
+
+ bt_assert(st = "Hello");
+ st.append(" world");
+ bt_assert(st = "Hello world");
}
bt_test_suite(t_string, "Testing strings");
bt_assert(append(hex:01122334, hex:6778899a) = hex:011223346778899a);
bt_assert(hex:01:12:23:34:45:56 ++ hex:67:78:89:9a:ab ++ hex:bc:cd:de:ef:f0 = bs2);
+ bs1 = hex:24:59:22:12;
+ bt_assert(bs1 = hex:24:59:22:12);
+ bs1.append(hex:01:23:45:67);
+ bt_assert(bs1 = hex:24:59:22:12:01:23:45:67);
}
bt_test_suite(t_bytestring, "Testing bytestrings");