gopkg.in/rethinkdb/rethinkdb-go.v6@v6.2.2/internal/integration/reql_tests/reql_datum_binary_test.go (about) 1 // Code generated by gen_tests.py and process_polyglot.py. 2 // Do not edit this file directly. 3 // The template for this file is located at: 4 // ../template.go.tpl 5 package reql_tests 6 7 import ( 8 "testing" 9 "time" 10 11 "github.com/stretchr/testify/suite" 12 r "gopkg.in/rethinkdb/rethinkdb-go.v6" 13 "gopkg.in/rethinkdb/rethinkdb-go.v6/internal/compare" 14 ) 15 16 // Tests of converstion to and from the RQL binary type 17 func TestDatumBinarySuite(t *testing.T) { 18 suite.Run(t, new(DatumBinarySuite)) 19 } 20 21 type DatumBinarySuite struct { 22 suite.Suite 23 24 session *r.Session 25 } 26 27 func (suite *DatumBinarySuite) SetupTest() { 28 suite.T().Log("Setting up DatumBinarySuite") 29 // Use imports to prevent errors 30 _ = time.Time{} 31 _ = compare.AnythingIsFine 32 33 session, err := r.Connect(r.ConnectOpts{ 34 Address: url, 35 }) 36 suite.Require().NoError(err, "Error returned when connecting to server") 37 suite.session = session 38 39 r.DBDrop("test").Exec(suite.session) 40 err = r.DBCreate("test").Exec(suite.session) 41 suite.Require().NoError(err) 42 err = r.DB("test").Wait().Exec(suite.session) 43 suite.Require().NoError(err) 44 45 } 46 47 func (suite *DatumBinarySuite) TearDownSuite() { 48 suite.T().Log("Tearing down DatumBinarySuite") 49 50 if suite.session != nil { 51 r.DB("rethinkdb").Table("_debug_scratch").Delete().Exec(suite.session) 52 r.DBDrop("test").Exec(suite.session) 53 54 suite.session.Close() 55 } 56 } 57 58 func (suite *DatumBinarySuite) TestCases() { 59 suite.T().Log("Running DatumBinarySuite: Tests of converstion to and from the RQL binary type") 60 61 // datum/binary.yaml line #8 62 // s = b'' 63 suite.T().Log("Possibly executing: var s []byte = []byte{}") 64 65 s := []byte{} 66 _ = s // Prevent any noused variable errors 67 68 { 69 // datum/binary.yaml line #10 70 /* s */ 71 var expected_ []byte = s 72 /* r.binary(s) */ 73 74 suite.T().Log("About to run line #10: r.Binary(s)") 75 76 runAndAssert(suite.Suite, expected_, r.Binary(s), suite.session, r.RunOpts{ 77 GeometryFormat: "raw", 78 GroupFormat: "map", 79 }) 80 suite.T().Log("Finished running line #10") 81 } 82 83 { 84 // datum/binary.yaml line #12 85 /* 0 */ 86 var expected_ int = 0 87 /* r.binary(s).count() */ 88 89 suite.T().Log("About to run line #12: r.Binary(s).Count()") 90 91 runAndAssert(suite.Suite, expected_, r.Binary(s).Count(), suite.session, r.RunOpts{ 92 GeometryFormat: "raw", 93 GroupFormat: "map", 94 }) 95 suite.T().Log("Finished running line #12") 96 } 97 98 // datum/binary.yaml line #17 99 // s = b'\x00' 100 suite.T().Log("Possibly executing: var s []byte = []byte{0}") 101 102 s = []byte{0} 103 104 { 105 // datum/binary.yaml line #19 106 /* s */ 107 var expected_ []byte = s 108 /* r.binary(s) */ 109 110 suite.T().Log("About to run line #19: r.Binary(s)") 111 112 runAndAssert(suite.Suite, expected_, r.Binary(s), suite.session, r.RunOpts{ 113 GeometryFormat: "raw", 114 GroupFormat: "map", 115 }) 116 suite.T().Log("Finished running line #19") 117 } 118 119 { 120 // datum/binary.yaml line #21 121 /* 1 */ 122 var expected_ int = 1 123 /* r.binary(s).count() */ 124 125 suite.T().Log("About to run line #21: r.Binary(s).Count()") 126 127 runAndAssert(suite.Suite, expected_, r.Binary(s).Count(), suite.session, r.RunOpts{ 128 GeometryFormat: "raw", 129 GroupFormat: "map", 130 }) 131 suite.T().Log("Finished running line #21") 132 } 133 134 // datum/binary.yaml line #26 135 // s = b'\x00\x42' 136 suite.T().Log("Possibly executing: var s []byte = []byte{0,66}") 137 138 s = []byte{0, 66} 139 140 { 141 // datum/binary.yaml line #28 142 /* s */ 143 var expected_ []byte = s 144 /* r.binary(s) */ 145 146 suite.T().Log("About to run line #28: r.Binary(s)") 147 148 runAndAssert(suite.Suite, expected_, r.Binary(s), suite.session, r.RunOpts{ 149 GeometryFormat: "raw", 150 GroupFormat: "map", 151 }) 152 suite.T().Log("Finished running line #28") 153 } 154 155 { 156 // datum/binary.yaml line #30 157 /* 2 */ 158 var expected_ int = 2 159 /* r.binary(s).count() */ 160 161 suite.T().Log("About to run line #30: r.Binary(s).Count()") 162 163 runAndAssert(suite.Suite, expected_, r.Binary(s).Count(), suite.session, r.RunOpts{ 164 GeometryFormat: "raw", 165 GroupFormat: "map", 166 }) 167 suite.T().Log("Finished running line #30") 168 } 169 170 // datum/binary.yaml line #35 171 // s = b'\x00\xfe\x7a' 172 suite.T().Log("Possibly executing: var s []byte = []byte{0,254,122}") 173 174 s = []byte{0, 254, 122} 175 176 { 177 // datum/binary.yaml line #37 178 /* s */ 179 var expected_ []byte = s 180 /* r.binary(s) */ 181 182 suite.T().Log("About to run line #37: r.Binary(s)") 183 184 runAndAssert(suite.Suite, expected_, r.Binary(s), suite.session, r.RunOpts{ 185 GeometryFormat: "raw", 186 GroupFormat: "map", 187 }) 188 suite.T().Log("Finished running line #37") 189 } 190 191 { 192 // datum/binary.yaml line #39 193 /* 3 */ 194 var expected_ int = 3 195 /* r.binary(s).count() */ 196 197 suite.T().Log("About to run line #39: r.Binary(s).Count()") 198 199 runAndAssert(suite.Suite, expected_, r.Binary(s).Count(), suite.session, r.RunOpts{ 200 GeometryFormat: "raw", 201 GroupFormat: "map", 202 }) 203 suite.T().Log("Finished running line #39") 204 } 205 206 // datum/binary.yaml line #44 207 // s = b'\xed\xfe\x00\xba' 208 suite.T().Log("Possibly executing: var s []byte = []byte{237,254,0,186}") 209 210 s = []byte{237, 254, 0, 186} 211 212 { 213 // datum/binary.yaml line #46 214 /* s */ 215 var expected_ []byte = s 216 /* r.binary(s) */ 217 218 suite.T().Log("About to run line #46: r.Binary(s)") 219 220 runAndAssert(suite.Suite, expected_, r.Binary(s), suite.session, r.RunOpts{ 221 GeometryFormat: "raw", 222 GroupFormat: "map", 223 }) 224 suite.T().Log("Finished running line #46") 225 } 226 227 { 228 // datum/binary.yaml line #48 229 /* 4 */ 230 var expected_ int = 4 231 /* r.binary(s).count() */ 232 233 suite.T().Log("About to run line #48: r.Binary(s).Count()") 234 235 runAndAssert(suite.Suite, expected_, r.Binary(s).Count(), suite.session, r.RunOpts{ 236 GeometryFormat: "raw", 237 GroupFormat: "map", 238 }) 239 suite.T().Log("Finished running line #48") 240 } 241 242 // datum/binary.yaml line #53 243 // s = b'\x50\xf9\x00\x77\xf9' 244 suite.T().Log("Possibly executing: var s []byte = []byte{80,249,0,119,249}") 245 246 s = []byte{80, 249, 0, 119, 249} 247 248 { 249 // datum/binary.yaml line #55 250 /* s */ 251 var expected_ []byte = s 252 /* r.binary(s) */ 253 254 suite.T().Log("About to run line #55: r.Binary(s)") 255 256 runAndAssert(suite.Suite, expected_, r.Binary(s), suite.session, r.RunOpts{ 257 GeometryFormat: "raw", 258 GroupFormat: "map", 259 }) 260 suite.T().Log("Finished running line #55") 261 } 262 263 { 264 // datum/binary.yaml line #57 265 /* 5 */ 266 var expected_ int = 5 267 /* r.binary(s).count() */ 268 269 suite.T().Log("About to run line #57: r.Binary(s).Count()") 270 271 runAndAssert(suite.Suite, expected_, r.Binary(s).Count(), suite.session, r.RunOpts{ 272 GeometryFormat: "raw", 273 GroupFormat: "map", 274 }) 275 suite.T().Log("Finished running line #57") 276 } 277 278 // datum/binary.yaml line #62 279 // s = b'\x2f\xe3\xb5\x57\x00\x92' 280 suite.T().Log("Possibly executing: var s []byte = []byte{47,227,181,87,0,146}") 281 282 s = []byte{47, 227, 181, 87, 0, 146} 283 284 { 285 // datum/binary.yaml line #64 286 /* s */ 287 var expected_ []byte = s 288 /* r.binary(s) */ 289 290 suite.T().Log("About to run line #64: r.Binary(s)") 291 292 runAndAssert(suite.Suite, expected_, r.Binary(s), suite.session, r.RunOpts{ 293 GeometryFormat: "raw", 294 GroupFormat: "map", 295 }) 296 suite.T().Log("Finished running line #64") 297 } 298 299 { 300 // datum/binary.yaml line #66 301 /* 6 */ 302 var expected_ int = 6 303 /* r.binary(s).count() */ 304 305 suite.T().Log("About to run line #66: r.Binary(s).Count()") 306 307 runAndAssert(suite.Suite, expected_, r.Binary(s).Count(), suite.session, r.RunOpts{ 308 GeometryFormat: "raw", 309 GroupFormat: "map", 310 }) 311 suite.T().Log("Finished running line #66") 312 } 313 314 // datum/binary.yaml line #71 315 // s = b'\xa9\x43\x54\xe9\x00\xf8\xfb' 316 suite.T().Log("Possibly executing: var s []byte = []byte{169,67,84,233,0,248,251}") 317 318 s = []byte{169, 67, 84, 233, 0, 248, 251} 319 320 { 321 // datum/binary.yaml line #73 322 /* s */ 323 var expected_ []byte = s 324 /* r.binary(s) */ 325 326 suite.T().Log("About to run line #73: r.Binary(s)") 327 328 runAndAssert(suite.Suite, expected_, r.Binary(s), suite.session, r.RunOpts{ 329 GeometryFormat: "raw", 330 GroupFormat: "map", 331 }) 332 suite.T().Log("Finished running line #73") 333 } 334 335 { 336 // datum/binary.yaml line #75 337 /* 7 */ 338 var expected_ int = 7 339 /* r.binary(s).count() */ 340 341 suite.T().Log("About to run line #75: r.Binary(s).Count()") 342 343 runAndAssert(suite.Suite, expected_, r.Binary(s).Count(), suite.session, r.RunOpts{ 344 GeometryFormat: "raw", 345 GroupFormat: "map", 346 }) 347 suite.T().Log("Finished running line #75") 348 } 349 350 // datum/binary.yaml line #80 351 // s = b'\x57\xbb\xe5\x82\x8b\xd3\x00\xf9' 352 suite.T().Log("Possibly executing: var s []byte = []byte{87,187,229,130,139,211,0,249}") 353 354 s = []byte{87, 187, 229, 130, 139, 211, 0, 249} 355 356 { 357 // datum/binary.yaml line #82 358 /* s */ 359 var expected_ []byte = s 360 /* r.binary(s) */ 361 362 suite.T().Log("About to run line #82: r.Binary(s)") 363 364 runAndAssert(suite.Suite, expected_, r.Binary(s), suite.session, r.RunOpts{ 365 GeometryFormat: "raw", 366 GroupFormat: "map", 367 }) 368 suite.T().Log("Finished running line #82") 369 } 370 371 { 372 // datum/binary.yaml line #84 373 /* 8 */ 374 var expected_ int = 8 375 /* r.binary(s).count() */ 376 377 suite.T().Log("About to run line #84: r.Binary(s).Count()") 378 379 runAndAssert(suite.Suite, expected_, r.Binary(s).Count(), suite.session, r.RunOpts{ 380 GeometryFormat: "raw", 381 GroupFormat: "map", 382 }) 383 suite.T().Log("Finished running line #84") 384 } 385 386 // datum/binary.yaml line #89 387 // s = b'\x44\x1b\x3e\x00\x13\x19\x29\x2a\xbf' 388 suite.T().Log("Possibly executing: var s []byte = []byte{68,27,62,0,19,25,41,42,191}") 389 390 s = []byte{68, 27, 62, 0, 19, 25, 41, 42, 191} 391 392 { 393 // datum/binary.yaml line #91 394 /* s */ 395 var expected_ []byte = s 396 /* r.binary(s) */ 397 398 suite.T().Log("About to run line #91: r.Binary(s)") 399 400 runAndAssert(suite.Suite, expected_, r.Binary(s), suite.session, r.RunOpts{ 401 GeometryFormat: "raw", 402 GroupFormat: "map", 403 }) 404 suite.T().Log("Finished running line #91") 405 } 406 407 { 408 // datum/binary.yaml line #93 409 /* 9 */ 410 var expected_ int = 9 411 /* r.binary(s).count() */ 412 413 suite.T().Log("About to run line #93: r.Binary(s).Count()") 414 415 runAndAssert(suite.Suite, expected_, r.Binary(s).Count(), suite.session, r.RunOpts{ 416 GeometryFormat: "raw", 417 GroupFormat: "map", 418 }) 419 suite.T().Log("Finished running line #93") 420 } 421 422 // datum/binary.yaml line #98 423 // s = b'\x8a\x1d\x09\x00\x5d\x60\x6b\x2e\x70\xd9' 424 suite.T().Log("Possibly executing: var s []byte = []byte{138,29,9,0,93,96,107,46,112,217}") 425 426 s = []byte{138, 29, 9, 0, 93, 96, 107, 46, 112, 217} 427 428 { 429 // datum/binary.yaml line #100 430 /* s */ 431 var expected_ []byte = s 432 /* r.binary(s) */ 433 434 suite.T().Log("About to run line #100: r.Binary(s)") 435 436 runAndAssert(suite.Suite, expected_, r.Binary(s), suite.session, r.RunOpts{ 437 GeometryFormat: "raw", 438 GroupFormat: "map", 439 }) 440 suite.T().Log("Finished running line #100") 441 } 442 443 { 444 // datum/binary.yaml line #102 445 /* 10 */ 446 var expected_ int = 10 447 /* r.binary(s).count() */ 448 449 suite.T().Log("About to run line #102: r.Binary(s).Count()") 450 451 runAndAssert(suite.Suite, expected_, r.Binary(s).Count(), suite.session, r.RunOpts{ 452 GeometryFormat: "raw", 453 GroupFormat: "map", 454 }) 455 suite.T().Log("Finished running line #102") 456 } 457 458 // datum/binary.yaml line #107 459 // s = b'\x00\xaf\x47\x4b\x38\x99\x14\x8d\x8f\x10\x51' 460 suite.T().Log("Possibly executing: var s []byte = []byte{0,175,71,75,56,153,20,141,143,16,81}") 461 462 s = []byte{0, 175, 71, 75, 56, 153, 20, 141, 143, 16, 81} 463 464 { 465 // datum/binary.yaml line #109 466 /* s */ 467 var expected_ []byte = s 468 /* r.binary(s) */ 469 470 suite.T().Log("About to run line #109: r.Binary(s)") 471 472 runAndAssert(suite.Suite, expected_, r.Binary(s), suite.session, r.RunOpts{ 473 GeometryFormat: "raw", 474 GroupFormat: "map", 475 }) 476 suite.T().Log("Finished running line #109") 477 } 478 479 { 480 // datum/binary.yaml line #111 481 /* 11 */ 482 var expected_ int = 11 483 /* r.binary(s).count() */ 484 485 suite.T().Log("About to run line #111: r.Binary(s).Count()") 486 487 runAndAssert(suite.Suite, expected_, r.Binary(s).Count(), suite.session, r.RunOpts{ 488 GeometryFormat: "raw", 489 GroupFormat: "map", 490 }) 491 suite.T().Log("Finished running line #111") 492 } 493 494 // datum/binary.yaml line #116 495 // s = b'\x45\x39\x00\xf7\xc2\x37\xfd\xe0\x38\x82\x40\xa9' 496 suite.T().Log("Possibly executing: var s []byte = []byte{69,57,0,247,194,55,253,224,56,130,64,169}") 497 498 s = []byte{69, 57, 0, 247, 194, 55, 253, 224, 56, 130, 64, 169} 499 500 { 501 // datum/binary.yaml line #118 502 /* s */ 503 var expected_ []byte = s 504 /* r.binary(s) */ 505 506 suite.T().Log("About to run line #118: r.Binary(s)") 507 508 runAndAssert(suite.Suite, expected_, r.Binary(s), suite.session, r.RunOpts{ 509 GeometryFormat: "raw", 510 GroupFormat: "map", 511 }) 512 suite.T().Log("Finished running line #118") 513 } 514 515 { 516 // datum/binary.yaml line #120 517 /* 12 */ 518 var expected_ int = 12 519 /* r.binary(s).count() */ 520 521 suite.T().Log("About to run line #120: r.Binary(s).Count()") 522 523 runAndAssert(suite.Suite, expected_, r.Binary(s).Count(), suite.session, r.RunOpts{ 524 GeometryFormat: "raw", 525 GroupFormat: "map", 526 }) 527 suite.T().Log("Finished running line #120") 528 } 529 530 // datum/binary.yaml line #128 531 // a = b'\x00' 532 suite.T().Log("Possibly executing: var a []byte = []byte{0}") 533 534 a := []byte{0} 535 _ = a // Prevent any noused variable errors 536 537 // datum/binary.yaml line #132 538 // b = b'\x00\x01' 539 suite.T().Log("Possibly executing: var b []byte = []byte{0,1}") 540 541 b := []byte{0, 1} 542 _ = b // Prevent any noused variable errors 543 544 // datum/binary.yaml line #136 545 // c = b'\x01' 546 suite.T().Log("Possibly executing: var c []byte = []byte{1}") 547 548 c := []byte{1} 549 _ = c // Prevent any noused variable errors 550 551 // datum/binary.yaml line #140 552 // d = b'\x70\x22' 553 suite.T().Log("Possibly executing: var d []byte = []byte{112,34}") 554 555 d := []byte{112, 34} 556 _ = d // Prevent any noused variable errors 557 558 // datum/binary.yaml line #144 559 // e = b'\x80' 560 suite.T().Log("Possibly executing: var e []byte = []byte{128}") 561 562 e := []byte{128} 563 _ = e // Prevent any noused variable errors 564 565 // datum/binary.yaml line #148 566 // f = b'\xFE' 567 suite.T().Log("Possibly executing: var f []byte = []byte{254}") 568 569 f := []byte{254} 570 _ = f // Prevent any noused variable errors 571 572 { 573 // datum/binary.yaml line #151 574 /* true */ 575 var expected_ bool = true 576 /* r.binary(a).eq(r.binary(a)) */ 577 578 suite.T().Log("About to run line #151: r.Binary(a).Eq(r.Binary(a))") 579 580 runAndAssert(suite.Suite, expected_, r.Binary(a).Eq(r.Binary(a)), suite.session, r.RunOpts{ 581 GeometryFormat: "raw", 582 GroupFormat: "map", 583 }) 584 suite.T().Log("Finished running line #151") 585 } 586 587 { 588 // datum/binary.yaml line #153 589 /* true */ 590 var expected_ bool = true 591 /* r.binary(a).le(r.binary(a)) */ 592 593 suite.T().Log("About to run line #153: r.Binary(a).Le(r.Binary(a))") 594 595 runAndAssert(suite.Suite, expected_, r.Binary(a).Le(r.Binary(a)), suite.session, r.RunOpts{ 596 GeometryFormat: "raw", 597 GroupFormat: "map", 598 }) 599 suite.T().Log("Finished running line #153") 600 } 601 602 { 603 // datum/binary.yaml line #155 604 /* true */ 605 var expected_ bool = true 606 /* r.binary(a).ge(r.binary(a)) */ 607 608 suite.T().Log("About to run line #155: r.Binary(a).Ge(r.Binary(a))") 609 610 runAndAssert(suite.Suite, expected_, r.Binary(a).Ge(r.Binary(a)), suite.session, r.RunOpts{ 611 GeometryFormat: "raw", 612 GroupFormat: "map", 613 }) 614 suite.T().Log("Finished running line #155") 615 } 616 617 { 618 // datum/binary.yaml line #157 619 /* false */ 620 var expected_ bool = false 621 /* r.binary(a).ne(r.binary(a)) */ 622 623 suite.T().Log("About to run line #157: r.Binary(a).Ne(r.Binary(a))") 624 625 runAndAssert(suite.Suite, expected_, r.Binary(a).Ne(r.Binary(a)), suite.session, r.RunOpts{ 626 GeometryFormat: "raw", 627 GroupFormat: "map", 628 }) 629 suite.T().Log("Finished running line #157") 630 } 631 632 { 633 // datum/binary.yaml line #159 634 /* false */ 635 var expected_ bool = false 636 /* r.binary(a).lt(r.binary(a)) */ 637 638 suite.T().Log("About to run line #159: r.Binary(a).Lt(r.Binary(a))") 639 640 runAndAssert(suite.Suite, expected_, r.Binary(a).Lt(r.Binary(a)), suite.session, r.RunOpts{ 641 GeometryFormat: "raw", 642 GroupFormat: "map", 643 }) 644 suite.T().Log("Finished running line #159") 645 } 646 647 { 648 // datum/binary.yaml line #161 649 /* false */ 650 var expected_ bool = false 651 /* r.binary(a).gt(r.binary(a)) */ 652 653 suite.T().Log("About to run line #161: r.Binary(a).Gt(r.Binary(a))") 654 655 runAndAssert(suite.Suite, expected_, r.Binary(a).Gt(r.Binary(a)), suite.session, r.RunOpts{ 656 GeometryFormat: "raw", 657 GroupFormat: "map", 658 }) 659 suite.T().Log("Finished running line #161") 660 } 661 662 { 663 // datum/binary.yaml line #165 664 /* true */ 665 var expected_ bool = true 666 /* r.binary(a).ne(r.binary(b)) */ 667 668 suite.T().Log("About to run line #165: r.Binary(a).Ne(r.Binary(b))") 669 670 runAndAssert(suite.Suite, expected_, r.Binary(a).Ne(r.Binary(b)), suite.session, r.RunOpts{ 671 GeometryFormat: "raw", 672 GroupFormat: "map", 673 }) 674 suite.T().Log("Finished running line #165") 675 } 676 677 { 678 // datum/binary.yaml line #167 679 /* true */ 680 var expected_ bool = true 681 /* r.binary(a).lt(r.binary(b)) */ 682 683 suite.T().Log("About to run line #167: r.Binary(a).Lt(r.Binary(b))") 684 685 runAndAssert(suite.Suite, expected_, r.Binary(a).Lt(r.Binary(b)), suite.session, r.RunOpts{ 686 GeometryFormat: "raw", 687 GroupFormat: "map", 688 }) 689 suite.T().Log("Finished running line #167") 690 } 691 692 { 693 // datum/binary.yaml line #169 694 /* true */ 695 var expected_ bool = true 696 /* r.binary(a).le(r.binary(b)) */ 697 698 suite.T().Log("About to run line #169: r.Binary(a).Le(r.Binary(b))") 699 700 runAndAssert(suite.Suite, expected_, r.Binary(a).Le(r.Binary(b)), suite.session, r.RunOpts{ 701 GeometryFormat: "raw", 702 GroupFormat: "map", 703 }) 704 suite.T().Log("Finished running line #169") 705 } 706 707 { 708 // datum/binary.yaml line #171 709 /* false */ 710 var expected_ bool = false 711 /* r.binary(a).ge(r.binary(b)) */ 712 713 suite.T().Log("About to run line #171: r.Binary(a).Ge(r.Binary(b))") 714 715 runAndAssert(suite.Suite, expected_, r.Binary(a).Ge(r.Binary(b)), suite.session, r.RunOpts{ 716 GeometryFormat: "raw", 717 GroupFormat: "map", 718 }) 719 suite.T().Log("Finished running line #171") 720 } 721 722 { 723 // datum/binary.yaml line #173 724 /* false */ 725 var expected_ bool = false 726 /* r.binary(a).gt(r.binary(b)) */ 727 728 suite.T().Log("About to run line #173: r.Binary(a).Gt(r.Binary(b))") 729 730 runAndAssert(suite.Suite, expected_, r.Binary(a).Gt(r.Binary(b)), suite.session, r.RunOpts{ 731 GeometryFormat: "raw", 732 GroupFormat: "map", 733 }) 734 suite.T().Log("Finished running line #173") 735 } 736 737 { 738 // datum/binary.yaml line #175 739 /* false */ 740 var expected_ bool = false 741 /* r.binary(a).eq(r.binary(b)) */ 742 743 suite.T().Log("About to run line #175: r.Binary(a).Eq(r.Binary(b))") 744 745 runAndAssert(suite.Suite, expected_, r.Binary(a).Eq(r.Binary(b)), suite.session, r.RunOpts{ 746 GeometryFormat: "raw", 747 GroupFormat: "map", 748 }) 749 suite.T().Log("Finished running line #175") 750 } 751 752 { 753 // datum/binary.yaml line #179 754 /* true */ 755 var expected_ bool = true 756 /* r.binary(b).ne(r.binary(c)) */ 757 758 suite.T().Log("About to run line #179: r.Binary(b).Ne(r.Binary(c))") 759 760 runAndAssert(suite.Suite, expected_, r.Binary(b).Ne(r.Binary(c)), suite.session, r.RunOpts{ 761 GeometryFormat: "raw", 762 GroupFormat: "map", 763 }) 764 suite.T().Log("Finished running line #179") 765 } 766 767 { 768 // datum/binary.yaml line #181 769 /* true */ 770 var expected_ bool = true 771 /* r.binary(b).lt(r.binary(c)) */ 772 773 suite.T().Log("About to run line #181: r.Binary(b).Lt(r.Binary(c))") 774 775 runAndAssert(suite.Suite, expected_, r.Binary(b).Lt(r.Binary(c)), suite.session, r.RunOpts{ 776 GeometryFormat: "raw", 777 GroupFormat: "map", 778 }) 779 suite.T().Log("Finished running line #181") 780 } 781 782 { 783 // datum/binary.yaml line #183 784 /* true */ 785 var expected_ bool = true 786 /* r.binary(b).le(r.binary(c)) */ 787 788 suite.T().Log("About to run line #183: r.Binary(b).Le(r.Binary(c))") 789 790 runAndAssert(suite.Suite, expected_, r.Binary(b).Le(r.Binary(c)), suite.session, r.RunOpts{ 791 GeometryFormat: "raw", 792 GroupFormat: "map", 793 }) 794 suite.T().Log("Finished running line #183") 795 } 796 797 { 798 // datum/binary.yaml line #185 799 /* false */ 800 var expected_ bool = false 801 /* r.binary(b).ge(r.binary(c)) */ 802 803 suite.T().Log("About to run line #185: r.Binary(b).Ge(r.Binary(c))") 804 805 runAndAssert(suite.Suite, expected_, r.Binary(b).Ge(r.Binary(c)), suite.session, r.RunOpts{ 806 GeometryFormat: "raw", 807 GroupFormat: "map", 808 }) 809 suite.T().Log("Finished running line #185") 810 } 811 812 { 813 // datum/binary.yaml line #187 814 /* false */ 815 var expected_ bool = false 816 /* r.binary(b).gt(r.binary(c)) */ 817 818 suite.T().Log("About to run line #187: r.Binary(b).Gt(r.Binary(c))") 819 820 runAndAssert(suite.Suite, expected_, r.Binary(b).Gt(r.Binary(c)), suite.session, r.RunOpts{ 821 GeometryFormat: "raw", 822 GroupFormat: "map", 823 }) 824 suite.T().Log("Finished running line #187") 825 } 826 827 { 828 // datum/binary.yaml line #189 829 /* false */ 830 var expected_ bool = false 831 /* r.binary(b).eq(r.binary(c)) */ 832 833 suite.T().Log("About to run line #189: r.Binary(b).Eq(r.Binary(c))") 834 835 runAndAssert(suite.Suite, expected_, r.Binary(b).Eq(r.Binary(c)), suite.session, r.RunOpts{ 836 GeometryFormat: "raw", 837 GroupFormat: "map", 838 }) 839 suite.T().Log("Finished running line #189") 840 } 841 842 { 843 // datum/binary.yaml line #193 844 /* true */ 845 var expected_ bool = true 846 /* r.binary(c).ne(r.binary(d)) */ 847 848 suite.T().Log("About to run line #193: r.Binary(c).Ne(r.Binary(d))") 849 850 runAndAssert(suite.Suite, expected_, r.Binary(c).Ne(r.Binary(d)), suite.session, r.RunOpts{ 851 GeometryFormat: "raw", 852 GroupFormat: "map", 853 }) 854 suite.T().Log("Finished running line #193") 855 } 856 857 { 858 // datum/binary.yaml line #195 859 /* true */ 860 var expected_ bool = true 861 /* r.binary(c).lt(r.binary(d)) */ 862 863 suite.T().Log("About to run line #195: r.Binary(c).Lt(r.Binary(d))") 864 865 runAndAssert(suite.Suite, expected_, r.Binary(c).Lt(r.Binary(d)), suite.session, r.RunOpts{ 866 GeometryFormat: "raw", 867 GroupFormat: "map", 868 }) 869 suite.T().Log("Finished running line #195") 870 } 871 872 { 873 // datum/binary.yaml line #197 874 /* true */ 875 var expected_ bool = true 876 /* r.binary(c).le(r.binary(d)) */ 877 878 suite.T().Log("About to run line #197: r.Binary(c).Le(r.Binary(d))") 879 880 runAndAssert(suite.Suite, expected_, r.Binary(c).Le(r.Binary(d)), suite.session, r.RunOpts{ 881 GeometryFormat: "raw", 882 GroupFormat: "map", 883 }) 884 suite.T().Log("Finished running line #197") 885 } 886 887 { 888 // datum/binary.yaml line #199 889 /* false */ 890 var expected_ bool = false 891 /* r.binary(c).ge(r.binary(d)) */ 892 893 suite.T().Log("About to run line #199: r.Binary(c).Ge(r.Binary(d))") 894 895 runAndAssert(suite.Suite, expected_, r.Binary(c).Ge(r.Binary(d)), suite.session, r.RunOpts{ 896 GeometryFormat: "raw", 897 GroupFormat: "map", 898 }) 899 suite.T().Log("Finished running line #199") 900 } 901 902 { 903 // datum/binary.yaml line #201 904 /* false */ 905 var expected_ bool = false 906 /* r.binary(c).gt(r.binary(d)) */ 907 908 suite.T().Log("About to run line #201: r.Binary(c).Gt(r.Binary(d))") 909 910 runAndAssert(suite.Suite, expected_, r.Binary(c).Gt(r.Binary(d)), suite.session, r.RunOpts{ 911 GeometryFormat: "raw", 912 GroupFormat: "map", 913 }) 914 suite.T().Log("Finished running line #201") 915 } 916 917 { 918 // datum/binary.yaml line #203 919 /* false */ 920 var expected_ bool = false 921 /* r.binary(c).eq(r.binary(d)) */ 922 923 suite.T().Log("About to run line #203: r.Binary(c).Eq(r.Binary(d))") 924 925 runAndAssert(suite.Suite, expected_, r.Binary(c).Eq(r.Binary(d)), suite.session, r.RunOpts{ 926 GeometryFormat: "raw", 927 GroupFormat: "map", 928 }) 929 suite.T().Log("Finished running line #203") 930 } 931 932 { 933 // datum/binary.yaml line #207 934 /* true */ 935 var expected_ bool = true 936 /* r.binary(d).ne(r.binary(e)) */ 937 938 suite.T().Log("About to run line #207: r.Binary(d).Ne(r.Binary(e))") 939 940 runAndAssert(suite.Suite, expected_, r.Binary(d).Ne(r.Binary(e)), suite.session, r.RunOpts{ 941 GeometryFormat: "raw", 942 GroupFormat: "map", 943 }) 944 suite.T().Log("Finished running line #207") 945 } 946 947 { 948 // datum/binary.yaml line #209 949 /* true */ 950 var expected_ bool = true 951 /* r.binary(d).lt(r.binary(e)) */ 952 953 suite.T().Log("About to run line #209: r.Binary(d).Lt(r.Binary(e))") 954 955 runAndAssert(suite.Suite, expected_, r.Binary(d).Lt(r.Binary(e)), suite.session, r.RunOpts{ 956 GeometryFormat: "raw", 957 GroupFormat: "map", 958 }) 959 suite.T().Log("Finished running line #209") 960 } 961 962 { 963 // datum/binary.yaml line #211 964 /* true */ 965 var expected_ bool = true 966 /* r.binary(d).le(r.binary(e)) */ 967 968 suite.T().Log("About to run line #211: r.Binary(d).Le(r.Binary(e))") 969 970 runAndAssert(suite.Suite, expected_, r.Binary(d).Le(r.Binary(e)), suite.session, r.RunOpts{ 971 GeometryFormat: "raw", 972 GroupFormat: "map", 973 }) 974 suite.T().Log("Finished running line #211") 975 } 976 977 { 978 // datum/binary.yaml line #213 979 /* false */ 980 var expected_ bool = false 981 /* r.binary(d).ge(r.binary(e)) */ 982 983 suite.T().Log("About to run line #213: r.Binary(d).Ge(r.Binary(e))") 984 985 runAndAssert(suite.Suite, expected_, r.Binary(d).Ge(r.Binary(e)), suite.session, r.RunOpts{ 986 GeometryFormat: "raw", 987 GroupFormat: "map", 988 }) 989 suite.T().Log("Finished running line #213") 990 } 991 992 { 993 // datum/binary.yaml line #215 994 /* false */ 995 var expected_ bool = false 996 /* r.binary(d).gt(r.binary(e)) */ 997 998 suite.T().Log("About to run line #215: r.Binary(d).Gt(r.Binary(e))") 999 1000 runAndAssert(suite.Suite, expected_, r.Binary(d).Gt(r.Binary(e)), suite.session, r.RunOpts{ 1001 GeometryFormat: "raw", 1002 GroupFormat: "map", 1003 }) 1004 suite.T().Log("Finished running line #215") 1005 } 1006 1007 { 1008 // datum/binary.yaml line #217 1009 /* false */ 1010 var expected_ bool = false 1011 /* r.binary(d).eq(r.binary(e)) */ 1012 1013 suite.T().Log("About to run line #217: r.Binary(d).Eq(r.Binary(e))") 1014 1015 runAndAssert(suite.Suite, expected_, r.Binary(d).Eq(r.Binary(e)), suite.session, r.RunOpts{ 1016 GeometryFormat: "raw", 1017 GroupFormat: "map", 1018 }) 1019 suite.T().Log("Finished running line #217") 1020 } 1021 1022 { 1023 // datum/binary.yaml line #221 1024 /* true */ 1025 var expected_ bool = true 1026 /* r.binary(e).ne(r.binary(f)) */ 1027 1028 suite.T().Log("About to run line #221: r.Binary(e).Ne(r.Binary(f))") 1029 1030 runAndAssert(suite.Suite, expected_, r.Binary(e).Ne(r.Binary(f)), suite.session, r.RunOpts{ 1031 GeometryFormat: "raw", 1032 GroupFormat: "map", 1033 }) 1034 suite.T().Log("Finished running line #221") 1035 } 1036 1037 { 1038 // datum/binary.yaml line #223 1039 /* true */ 1040 var expected_ bool = true 1041 /* r.binary(e).lt(r.binary(f)) */ 1042 1043 suite.T().Log("About to run line #223: r.Binary(e).Lt(r.Binary(f))") 1044 1045 runAndAssert(suite.Suite, expected_, r.Binary(e).Lt(r.Binary(f)), suite.session, r.RunOpts{ 1046 GeometryFormat: "raw", 1047 GroupFormat: "map", 1048 }) 1049 suite.T().Log("Finished running line #223") 1050 } 1051 1052 { 1053 // datum/binary.yaml line #225 1054 /* true */ 1055 var expected_ bool = true 1056 /* r.binary(e).le(r.binary(f)) */ 1057 1058 suite.T().Log("About to run line #225: r.Binary(e).Le(r.Binary(f))") 1059 1060 runAndAssert(suite.Suite, expected_, r.Binary(e).Le(r.Binary(f)), suite.session, r.RunOpts{ 1061 GeometryFormat: "raw", 1062 GroupFormat: "map", 1063 }) 1064 suite.T().Log("Finished running line #225") 1065 } 1066 1067 { 1068 // datum/binary.yaml line #227 1069 /* false */ 1070 var expected_ bool = false 1071 /* r.binary(e).ge(r.binary(f)) */ 1072 1073 suite.T().Log("About to run line #227: r.Binary(e).Ge(r.Binary(f))") 1074 1075 runAndAssert(suite.Suite, expected_, r.Binary(e).Ge(r.Binary(f)), suite.session, r.RunOpts{ 1076 GeometryFormat: "raw", 1077 GroupFormat: "map", 1078 }) 1079 suite.T().Log("Finished running line #227") 1080 } 1081 1082 { 1083 // datum/binary.yaml line #229 1084 /* false */ 1085 var expected_ bool = false 1086 /* r.binary(e).gt(r.binary(f)) */ 1087 1088 suite.T().Log("About to run line #229: r.Binary(e).Gt(r.Binary(f))") 1089 1090 runAndAssert(suite.Suite, expected_, r.Binary(e).Gt(r.Binary(f)), suite.session, r.RunOpts{ 1091 GeometryFormat: "raw", 1092 GroupFormat: "map", 1093 }) 1094 suite.T().Log("Finished running line #229") 1095 } 1096 1097 { 1098 // datum/binary.yaml line #231 1099 /* false */ 1100 var expected_ bool = false 1101 /* r.binary(e).eq(r.binary(f)) */ 1102 1103 suite.T().Log("About to run line #231: r.Binary(e).Eq(r.Binary(f))") 1104 1105 runAndAssert(suite.Suite, expected_, r.Binary(e).Eq(r.Binary(f)), suite.session, r.RunOpts{ 1106 GeometryFormat: "raw", 1107 GroupFormat: "map", 1108 }) 1109 suite.T().Log("Finished running line #231") 1110 } 1111 1112 { 1113 // datum/binary.yaml line #235 1114 /* true */ 1115 var expected_ bool = true 1116 /* r.binary(f).eq(r.binary(f)) */ 1117 1118 suite.T().Log("About to run line #235: r.Binary(f).Eq(r.Binary(f))") 1119 1120 runAndAssert(suite.Suite, expected_, r.Binary(f).Eq(r.Binary(f)), suite.session, r.RunOpts{ 1121 GeometryFormat: "raw", 1122 GroupFormat: "map", 1123 }) 1124 suite.T().Log("Finished running line #235") 1125 } 1126 1127 { 1128 // datum/binary.yaml line #237 1129 /* true */ 1130 var expected_ bool = true 1131 /* r.binary(f).le(r.binary(f)) */ 1132 1133 suite.T().Log("About to run line #237: r.Binary(f).Le(r.Binary(f))") 1134 1135 runAndAssert(suite.Suite, expected_, r.Binary(f).Le(r.Binary(f)), suite.session, r.RunOpts{ 1136 GeometryFormat: "raw", 1137 GroupFormat: "map", 1138 }) 1139 suite.T().Log("Finished running line #237") 1140 } 1141 1142 { 1143 // datum/binary.yaml line #239 1144 /* true */ 1145 var expected_ bool = true 1146 /* r.binary(f).ge(r.binary(f)) */ 1147 1148 suite.T().Log("About to run line #239: r.Binary(f).Ge(r.Binary(f))") 1149 1150 runAndAssert(suite.Suite, expected_, r.Binary(f).Ge(r.Binary(f)), suite.session, r.RunOpts{ 1151 GeometryFormat: "raw", 1152 GroupFormat: "map", 1153 }) 1154 suite.T().Log("Finished running line #239") 1155 } 1156 1157 { 1158 // datum/binary.yaml line #241 1159 /* false */ 1160 var expected_ bool = false 1161 /* r.binary(f).ne(r.binary(f)) */ 1162 1163 suite.T().Log("About to run line #241: r.Binary(f).Ne(r.Binary(f))") 1164 1165 runAndAssert(suite.Suite, expected_, r.Binary(f).Ne(r.Binary(f)), suite.session, r.RunOpts{ 1166 GeometryFormat: "raw", 1167 GroupFormat: "map", 1168 }) 1169 suite.T().Log("Finished running line #241") 1170 } 1171 1172 { 1173 // datum/binary.yaml line #243 1174 /* false */ 1175 var expected_ bool = false 1176 /* r.binary(f).lt(r.binary(f)) */ 1177 1178 suite.T().Log("About to run line #243: r.Binary(f).Lt(r.Binary(f))") 1179 1180 runAndAssert(suite.Suite, expected_, r.Binary(f).Lt(r.Binary(f)), suite.session, r.RunOpts{ 1181 GeometryFormat: "raw", 1182 GroupFormat: "map", 1183 }) 1184 suite.T().Log("Finished running line #243") 1185 } 1186 1187 { 1188 // datum/binary.yaml line #245 1189 /* false */ 1190 var expected_ bool = false 1191 /* r.binary(f).gt(r.binary(f)) */ 1192 1193 suite.T().Log("About to run line #245: r.Binary(f).Gt(r.Binary(f))") 1194 1195 runAndAssert(suite.Suite, expected_, r.Binary(f).Gt(r.Binary(f)), suite.session, r.RunOpts{ 1196 GeometryFormat: "raw", 1197 GroupFormat: "map", 1198 }) 1199 suite.T().Log("Finished running line #245") 1200 } 1201 1202 { 1203 // datum/binary.yaml line #269 1204 /* 'foo' */ 1205 var expected_ string = "foo" 1206 /* r.binary(b'foo').coerce_to('string') */ 1207 1208 suite.T().Log("About to run line #269: r.Binary([]byte{102,111,111}).CoerceTo('string')") 1209 1210 runAndAssert(suite.Suite, expected_, r.Binary([]byte{102, 111, 111}).CoerceTo("string"), suite.session, r.RunOpts{ 1211 GeometryFormat: "raw", 1212 GroupFormat: "map", 1213 }) 1214 suite.T().Log("Finished running line #269") 1215 } 1216 1217 { 1218 // datum/binary.yaml line #284 1219 /* b'foo' */ 1220 var expected_ []byte = []byte{102, 111, 111} 1221 /* r.expr('foo').coerce_to('binary') */ 1222 1223 suite.T().Log("About to run line #284: r.Expr('foo').CoerceTo('binary')") 1224 1225 runAndAssert(suite.Suite, expected_, r.Expr("foo").CoerceTo("binary"), suite.session, r.RunOpts{ 1226 GeometryFormat: "raw", 1227 GroupFormat: "map", 1228 }) 1229 suite.T().Log("Finished running line #284") 1230 } 1231 1232 { 1233 // datum/binary.yaml line #287 1234 /* True */ 1235 var expected_ bool = true 1236 /* r.binary(a).coerce_to('bool') */ 1237 1238 suite.T().Log("About to run line #287: r.Binary(a).CoerceTo('bool')") 1239 1240 runAndAssert(suite.Suite, expected_, r.Binary(a).CoerceTo("bool"), suite.session, r.RunOpts{ 1241 GeometryFormat: "raw", 1242 GroupFormat: "map", 1243 }) 1244 suite.T().Log("Finished running line #287") 1245 } 1246 1247 { 1248 // datum/binary.yaml line #290 1249 /* b'foo' */ 1250 var expected_ []byte = []byte{102, 111, 111} 1251 /* r.binary(b'foo').coerce_to('binary') */ 1252 1253 suite.T().Log("About to run line #290: r.Binary([]byte{102,111,111}).CoerceTo('binary')") 1254 1255 runAndAssert(suite.Suite, expected_, r.Binary([]byte{102, 111, 111}).CoerceTo("binary"), suite.session, r.RunOpts{ 1256 GeometryFormat: "raw", 1257 GroupFormat: "map", 1258 }) 1259 suite.T().Log("Finished running line #290") 1260 } 1261 1262 { 1263 // datum/binary.yaml line #294 1264 /* b'ef' */ 1265 var expected_ []byte = []byte{101, 102} 1266 /* r.binary(b'abcdefg').slice(-3,-1) */ 1267 1268 suite.T().Log("About to run line #294: r.Binary([]byte{97,98,99,100,101,102,103}).Slice(-3, -1)") 1269 1270 runAndAssert(suite.Suite, expected_, r.Binary([]byte{97, 98, 99, 100, 101, 102, 103}).Slice(-3, -1), suite.session, r.RunOpts{ 1271 GeometryFormat: "raw", 1272 GroupFormat: "map", 1273 }) 1274 suite.T().Log("Finished running line #294") 1275 } 1276 1277 { 1278 // datum/binary.yaml line #296 1279 /* b'ab' */ 1280 var expected_ []byte = []byte{97, 98} 1281 /* r.binary(b'abcdefg').slice(0, 2) */ 1282 1283 suite.T().Log("About to run line #296: r.Binary([]byte{97,98,99,100,101,102,103}).Slice(0, 2)") 1284 1285 runAndAssert(suite.Suite, expected_, r.Binary([]byte{97, 98, 99, 100, 101, 102, 103}).Slice(0, 2), suite.session, r.RunOpts{ 1286 GeometryFormat: "raw", 1287 GroupFormat: "map", 1288 }) 1289 suite.T().Log("Finished running line #296") 1290 } 1291 1292 { 1293 // datum/binary.yaml line #298 1294 /* b'def' */ 1295 var expected_ []byte = []byte{100, 101, 102} 1296 /* r.binary(b'abcdefg').slice(3, -1) */ 1297 1298 suite.T().Log("About to run line #298: r.Binary([]byte{97,98,99,100,101,102,103}).Slice(3, -1)") 1299 1300 runAndAssert(suite.Suite, expected_, r.Binary([]byte{97, 98, 99, 100, 101, 102, 103}).Slice(3, -1), suite.session, r.RunOpts{ 1301 GeometryFormat: "raw", 1302 GroupFormat: "map", 1303 }) 1304 suite.T().Log("Finished running line #298") 1305 } 1306 1307 { 1308 // datum/binary.yaml line #300 1309 /* b'cde' */ 1310 var expected_ []byte = []byte{99, 100, 101} 1311 /* r.binary(b'abcdefg').slice(-5, 5) */ 1312 1313 suite.T().Log("About to run line #300: r.Binary([]byte{97,98,99,100,101,102,103}).Slice(-5, 5)") 1314 1315 runAndAssert(suite.Suite, expected_, r.Binary([]byte{97, 98, 99, 100, 101, 102, 103}).Slice(-5, 5), suite.session, r.RunOpts{ 1316 GeometryFormat: "raw", 1317 GroupFormat: "map", 1318 }) 1319 suite.T().Log("Finished running line #300") 1320 } 1321 1322 { 1323 // datum/binary.yaml line #302 1324 /* b'ab' */ 1325 var expected_ []byte = []byte{97, 98} 1326 /* r.binary(b'abcdefg').slice(-8, 2) */ 1327 1328 suite.T().Log("About to run line #302: r.Binary([]byte{97,98,99,100,101,102,103}).Slice(-8, 2)") 1329 1330 runAndAssert(suite.Suite, expected_, r.Binary([]byte{97, 98, 99, 100, 101, 102, 103}).Slice(-8, 2), suite.session, r.RunOpts{ 1331 GeometryFormat: "raw", 1332 GroupFormat: "map", 1333 }) 1334 suite.T().Log("Finished running line #302") 1335 } 1336 1337 { 1338 // datum/binary.yaml line #304 1339 /* b'fg' */ 1340 var expected_ []byte = []byte{102, 103} 1341 /* r.binary(b'abcdefg').slice(5, 7) */ 1342 1343 suite.T().Log("About to run line #304: r.Binary([]byte{97,98,99,100,101,102,103}).Slice(5, 7)") 1344 1345 runAndAssert(suite.Suite, expected_, r.Binary([]byte{97, 98, 99, 100, 101, 102, 103}).Slice(5, 7), suite.session, r.RunOpts{ 1346 GeometryFormat: "raw", 1347 GroupFormat: "map", 1348 }) 1349 suite.T().Log("Finished running line #304") 1350 } 1351 1352 { 1353 // datum/binary.yaml line #308 1354 /* b'ab' */ 1355 var expected_ []byte = []byte{97, 98} 1356 /* r.binary(b'abcdefg').slice(-9, 2) */ 1357 1358 suite.T().Log("About to run line #308: r.Binary([]byte{97,98,99,100,101,102,103}).Slice(-9, 2)") 1359 1360 runAndAssert(suite.Suite, expected_, r.Binary([]byte{97, 98, 99, 100, 101, 102, 103}).Slice(-9, 2), suite.session, r.RunOpts{ 1361 GeometryFormat: "raw", 1362 GroupFormat: "map", 1363 }) 1364 suite.T().Log("Finished running line #308") 1365 } 1366 1367 { 1368 // datum/binary.yaml line #312 1369 /* b'fg' */ 1370 var expected_ []byte = []byte{102, 103} 1371 /* r.binary(b'abcdefg').slice(5, 9) */ 1372 1373 suite.T().Log("About to run line #312: r.Binary([]byte{97,98,99,100,101,102,103}).Slice(5, 9)") 1374 1375 runAndAssert(suite.Suite, expected_, r.Binary([]byte{97, 98, 99, 100, 101, 102, 103}).Slice(5, 9), suite.session, r.RunOpts{ 1376 GeometryFormat: "raw", 1377 GroupFormat: "map", 1378 }) 1379 suite.T().Log("Finished running line #312") 1380 } 1381 1382 { 1383 // datum/binary.yaml line #316 1384 /* b */ 1385 var expected_ []byte = b 1386 /* r.binary(b) */ 1387 1388 suite.T().Log("About to run line #316: r.Binary(b)") 1389 1390 runAndAssert(suite.Suite, expected_, r.Binary(b), suite.session, r.RunOpts{ 1391 BinaryFormat: "native", 1392 GeometryFormat: "raw", 1393 GroupFormat: "map", 1394 }) 1395 suite.T().Log("Finished running line #316") 1396 } 1397 1398 { 1399 // datum/binary.yaml line #320 1400 /* {'$reql_type$':'BINARY','data':'AAE='} */ 1401 var expected_ map[interface{}]interface{} = map[interface{}]interface{}{"$reql_type$": "BINARY", "data": "AAE="} 1402 /* r.binary(b) */ 1403 1404 suite.T().Log("About to run line #320: r.Binary(b)") 1405 1406 runAndAssert(suite.Suite, expected_, r.Binary(b), suite.session, r.RunOpts{ 1407 BinaryFormat: "raw", 1408 GeometryFormat: "raw", 1409 GroupFormat: "map", 1410 }) 1411 suite.T().Log("Finished running line #320") 1412 } 1413 1414 { 1415 // datum/binary.yaml line #326 1416 /* b"data" */ 1417 var expected_ []byte = []byte{100, 97, 116, 97} 1418 /* r.binary(r.expr("data")) */ 1419 1420 suite.T().Log("About to run line #326: r.Binary(r.Expr('data'))") 1421 1422 runAndAssert(suite.Suite, expected_, r.Binary(r.Expr("data")), suite.session, r.RunOpts{ 1423 GeometryFormat: "raw", 1424 GroupFormat: "map", 1425 }) 1426 suite.T().Log("Finished running line #326") 1427 } 1428 1429 { 1430 // datum/binary.yaml line #332 1431 /* err('ReqlQueryLogicError', 'Expected type STRING but found OBJECT.', []) */ 1432 var expected_ Err = err("ReqlQueryLogicError", "Expected type STRING but found OBJECT.") 1433 /* r.binary(r.expr({})) */ 1434 1435 suite.T().Log("About to run line #332: r.Binary(r.Expr(map[interface{}]interface{}{}))") 1436 1437 runAndAssert(suite.Suite, expected_, r.Binary(r.Expr(map[interface{}]interface{}{})), suite.session, r.RunOpts{ 1438 GeometryFormat: "raw", 1439 GroupFormat: "map", 1440 }) 1441 suite.T().Log("Finished running line #332") 1442 } 1443 1444 { 1445 // datum/binary.yaml line #335 1446 /* err('ReqlQueryLogicError', 'Expected type STRING but found ARRAY.', []) */ 1447 var expected_ Err = err("ReqlQueryLogicError", "Expected type STRING but found ARRAY.") 1448 /* r.binary(r.expr([])) */ 1449 1450 suite.T().Log("About to run line #335: r.Binary(r.Expr([]interface{}{}))") 1451 1452 runAndAssert(suite.Suite, expected_, r.Binary(r.Expr([]interface{}{})), suite.session, r.RunOpts{ 1453 GeometryFormat: "raw", 1454 GroupFormat: "map", 1455 }) 1456 suite.T().Log("Finished running line #335") 1457 } 1458 1459 { 1460 // datum/binary.yaml line #341 1461 /* err('ReqlQueryLogicError','Invalid binary pseudotype:'+' lacking `data` key.',[]) */ 1462 var expected_ Err = err("ReqlQueryLogicError", "Invalid binary pseudotype:"+" lacking `data` key.") 1463 /* r.expr({'$reql_type$':'BINARY'}) */ 1464 1465 suite.T().Log("About to run line #341: r.Expr(map[interface{}]interface{}{'$reql_type$': 'BINARY', })") 1466 1467 runAndAssert(suite.Suite, expected_, r.Expr(map[interface{}]interface{}{"$reql_type$": "BINARY"}), suite.session, r.RunOpts{ 1468 GeometryFormat: "raw", 1469 GroupFormat: "map", 1470 }) 1471 suite.T().Log("Finished running line #341") 1472 } 1473 1474 { 1475 // datum/binary.yaml line #346 1476 /* err('ReqlQueryLogicError','Invalid base64 format, data found after padding character \'=\'.',[]) */ 1477 var expected_ Err = err("ReqlQueryLogicError", "Invalid base64 format, data found after padding character '='.") 1478 /* r.expr({'$reql_type$':'BINARY','data':'ABCDEFGH==AA'}) */ 1479 1480 suite.T().Log("About to run line #346: r.Expr(map[interface{}]interface{}{'$reql_type$': 'BINARY', 'data': 'ABCDEFGH==AA', })") 1481 1482 runAndAssert(suite.Suite, expected_, r.Expr(map[interface{}]interface{}{"$reql_type$": "BINARY", "data": "ABCDEFGH==AA"}), suite.session, r.RunOpts{ 1483 GeometryFormat: "raw", 1484 GroupFormat: "map", 1485 }) 1486 suite.T().Log("Finished running line #346") 1487 } 1488 1489 { 1490 // datum/binary.yaml line #348 1491 /* err('ReqlQueryLogicError','Invalid base64 format, data found after padding character \'=\'.',[]) */ 1492 var expected_ Err = err("ReqlQueryLogicError", "Invalid base64 format, data found after padding character '='.") 1493 /* r.expr({'$reql_type$':'BINARY','data':'ABCDEF==$'}) */ 1494 1495 suite.T().Log("About to run line #348: r.Expr(map[interface{}]interface{}{'$reql_type$': 'BINARY', 'data': 'ABCDEF==$', })") 1496 1497 runAndAssert(suite.Suite, expected_, r.Expr(map[interface{}]interface{}{"$reql_type$": "BINARY", "data": "ABCDEF==$"}), suite.session, r.RunOpts{ 1498 GeometryFormat: "raw", 1499 GroupFormat: "map", 1500 }) 1501 suite.T().Log("Finished running line #348") 1502 } 1503 1504 { 1505 // datum/binary.yaml line #350 1506 /* err('ReqlQueryLogicError','Invalid base64 character found:'+' \'^\'.',[]) */ 1507 var expected_ Err = err("ReqlQueryLogicError", "Invalid base64 character found:"+" '^'.") 1508 /* r.expr({'$reql_type$':'BINARY','data':'A^CDEFGH'}) */ 1509 1510 suite.T().Log("About to run line #350: r.Expr(map[interface{}]interface{}{'$reql_type$': 'BINARY', 'data': 'A^CDEFGH', })") 1511 1512 runAndAssert(suite.Suite, expected_, r.Expr(map[interface{}]interface{}{"$reql_type$": "BINARY", "data": "A^CDEFGH"}), suite.session, r.RunOpts{ 1513 GeometryFormat: "raw", 1514 GroupFormat: "map", 1515 }) 1516 suite.T().Log("Finished running line #350") 1517 } 1518 1519 { 1520 // datum/binary.yaml line #352 1521 /* err('ReqlQueryLogicError','Invalid base64 length:'+' 1 character remaining, cannot decode a full byte.',[]) */ 1522 var expected_ Err = err("ReqlQueryLogicError", "Invalid base64 length:"+" 1 character remaining, cannot decode a full byte.") 1523 /* r.expr({'$reql_type$':'BINARY','data':'ABCDE'}) */ 1524 1525 suite.T().Log("About to run line #352: r.Expr(map[interface{}]interface{}{'$reql_type$': 'BINARY', 'data': 'ABCDE', })") 1526 1527 runAndAssert(suite.Suite, expected_, r.Expr(map[interface{}]interface{}{"$reql_type$": "BINARY", "data": "ABCDE"}), suite.session, r.RunOpts{ 1528 GeometryFormat: "raw", 1529 GroupFormat: "map", 1530 }) 1531 suite.T().Log("Finished running line #352") 1532 } 1533 1534 { 1535 // datum/binary.yaml line #356 1536 /* err('ReqlQueryLogicError','Cannot coerce BINARY to ARRAY.',[]) */ 1537 var expected_ Err = err("ReqlQueryLogicError", "Cannot coerce BINARY to ARRAY.") 1538 /* r.binary(a).coerce_to('array') */ 1539 1540 suite.T().Log("About to run line #356: r.Binary(a).CoerceTo('array')") 1541 1542 runAndAssert(suite.Suite, expected_, r.Binary(a).CoerceTo("array"), suite.session, r.RunOpts{ 1543 GeometryFormat: "raw", 1544 GroupFormat: "map", 1545 }) 1546 suite.T().Log("Finished running line #356") 1547 } 1548 1549 { 1550 // datum/binary.yaml line #358 1551 /* err('ReqlQueryLogicError','Cannot coerce BINARY to OBJECT.',[]) */ 1552 var expected_ Err = err("ReqlQueryLogicError", "Cannot coerce BINARY to OBJECT.") 1553 /* r.binary(a).coerce_to('object') */ 1554 1555 suite.T().Log("About to run line #358: r.Binary(a).CoerceTo('object')") 1556 1557 runAndAssert(suite.Suite, expected_, r.Binary(a).CoerceTo("object"), suite.session, r.RunOpts{ 1558 GeometryFormat: "raw", 1559 GroupFormat: "map", 1560 }) 1561 suite.T().Log("Finished running line #358") 1562 } 1563 1564 { 1565 // datum/binary.yaml line #360 1566 /* err('ReqlQueryLogicError','Cannot coerce BINARY to NUMBER.',[]) */ 1567 var expected_ Err = err("ReqlQueryLogicError", "Cannot coerce BINARY to NUMBER.") 1568 /* r.binary(a).coerce_to('number') */ 1569 1570 suite.T().Log("About to run line #360: r.Binary(a).CoerceTo('number')") 1571 1572 runAndAssert(suite.Suite, expected_, r.Binary(a).CoerceTo("number"), suite.session, r.RunOpts{ 1573 GeometryFormat: "raw", 1574 GroupFormat: "map", 1575 }) 1576 suite.T().Log("Finished running line #360") 1577 } 1578 1579 { 1580 // datum/binary.yaml line #362 1581 /* err('ReqlQueryLogicError','Cannot coerce BINARY to NULL.',[]) */ 1582 var expected_ Err = err("ReqlQueryLogicError", "Cannot coerce BINARY to NULL.") 1583 /* r.binary(a).coerce_to('nu'+'ll') */ 1584 1585 suite.T().Log("About to run line #362: r.Binary(a).CoerceTo(r.Add('nu', 'll'))") 1586 1587 runAndAssert(suite.Suite, expected_, r.Binary(a).CoerceTo(r.Add("nu", "ll")), suite.session, r.RunOpts{ 1588 GeometryFormat: "raw", 1589 GroupFormat: "map", 1590 }) 1591 suite.T().Log("Finished running line #362") 1592 } 1593 }