gopkg.in/rethinkdb/rethinkdb-go.v6@v6.2.2/internal/integration/reql_tests/reql_math_logic_logic_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 // These tests are aimed at &&, ||, and ! 17 func TestMathLogicLogicSuite(t *testing.T) { 18 suite.Run(t, new(MathLogicLogicSuite)) 19 } 20 21 type MathLogicLogicSuite struct { 22 suite.Suite 23 24 session *r.Session 25 } 26 27 func (suite *MathLogicLogicSuite) SetupTest() { 28 suite.T().Log("Setting up MathLogicLogicSuite") 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 *MathLogicLogicSuite) TearDownSuite() { 48 suite.T().Log("Tearing down MathLogicLogicSuite") 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 *MathLogicLogicSuite) TestCases() { 59 suite.T().Log("Running MathLogicLogicSuite: These tests are aimed at &&, ||, and !") 60 61 { 62 // math_logic/logic.yaml line #8 63 /* true */ 64 var expected_ bool = true 65 /* r.expr(true) & true */ 66 67 suite.T().Log("About to run line #8: r.Expr(true).And(true)") 68 69 runAndAssert(suite.Suite, expected_, r.Expr(true).And(true), suite.session, r.RunOpts{ 70 GeometryFormat: "raw", 71 GroupFormat: "map", 72 }) 73 suite.T().Log("Finished running line #8") 74 } 75 76 { 77 // math_logic/logic.yaml line #9 78 /* true */ 79 var expected_ bool = true 80 /* true & r.expr(true) */ 81 82 suite.T().Log("About to run line #9: r.And(true, r.Expr(true))") 83 84 runAndAssert(suite.Suite, expected_, r.And(true, r.Expr(true)), suite.session, r.RunOpts{ 85 GeometryFormat: "raw", 86 GroupFormat: "map", 87 }) 88 suite.T().Log("Finished running line #9") 89 } 90 91 { 92 // math_logic/logic.yaml line #10 93 /* true */ 94 var expected_ bool = true 95 /* r.and_(true,true) */ 96 97 suite.T().Log("About to run line #10: r.And(true, true)") 98 99 runAndAssert(suite.Suite, expected_, r.And(true, true), suite.session, r.RunOpts{ 100 GeometryFormat: "raw", 101 GroupFormat: "map", 102 }) 103 suite.T().Log("Finished running line #10") 104 } 105 106 { 107 // math_logic/logic.yaml line #11 108 /* true */ 109 var expected_ bool = true 110 /* r.expr(true).and_(true) */ 111 112 suite.T().Log("About to run line #11: r.Expr(true).And(true)") 113 114 runAndAssert(suite.Suite, expected_, r.Expr(true).And(true), suite.session, r.RunOpts{ 115 GeometryFormat: "raw", 116 GroupFormat: "map", 117 }) 118 suite.T().Log("Finished running line #11") 119 } 120 121 { 122 // math_logic/logic.yaml line #22 123 /* false */ 124 var expected_ bool = false 125 /* r.expr(true) & false */ 126 127 suite.T().Log("About to run line #22: r.Expr(true).And(false)") 128 129 runAndAssert(suite.Suite, expected_, r.Expr(true).And(false), suite.session, r.RunOpts{ 130 GeometryFormat: "raw", 131 GroupFormat: "map", 132 }) 133 suite.T().Log("Finished running line #22") 134 } 135 136 { 137 // math_logic/logic.yaml line #23 138 /* false */ 139 var expected_ bool = false 140 /* r.expr(false) & false */ 141 142 suite.T().Log("About to run line #23: r.Expr(false).And(false)") 143 144 runAndAssert(suite.Suite, expected_, r.Expr(false).And(false), suite.session, r.RunOpts{ 145 GeometryFormat: "raw", 146 GroupFormat: "map", 147 }) 148 suite.T().Log("Finished running line #23") 149 } 150 151 { 152 // math_logic/logic.yaml line #24 153 /* false */ 154 var expected_ bool = false 155 /* true & r.expr(false) */ 156 157 suite.T().Log("About to run line #24: r.And(true, r.Expr(false))") 158 159 runAndAssert(suite.Suite, expected_, r.And(true, r.Expr(false)), suite.session, r.RunOpts{ 160 GeometryFormat: "raw", 161 GroupFormat: "map", 162 }) 163 suite.T().Log("Finished running line #24") 164 } 165 166 { 167 // math_logic/logic.yaml line #25 168 /* false */ 169 var expected_ bool = false 170 /* false & r.expr(false) */ 171 172 suite.T().Log("About to run line #25: r.And(false, r.Expr(false))") 173 174 runAndAssert(suite.Suite, expected_, r.And(false, r.Expr(false)), suite.session, r.RunOpts{ 175 GeometryFormat: "raw", 176 GroupFormat: "map", 177 }) 178 suite.T().Log("Finished running line #25") 179 } 180 181 { 182 // math_logic/logic.yaml line #26 183 /* false */ 184 var expected_ bool = false 185 /* r.and_(true,false) */ 186 187 suite.T().Log("About to run line #26: r.And(true, false)") 188 189 runAndAssert(suite.Suite, expected_, r.And(true, false), suite.session, r.RunOpts{ 190 GeometryFormat: "raw", 191 GroupFormat: "map", 192 }) 193 suite.T().Log("Finished running line #26") 194 } 195 196 { 197 // math_logic/logic.yaml line #27 198 /* false */ 199 var expected_ bool = false 200 /* r.and_(false,false) */ 201 202 suite.T().Log("About to run line #27: r.And(false, false)") 203 204 runAndAssert(suite.Suite, expected_, r.And(false, false), suite.session, r.RunOpts{ 205 GeometryFormat: "raw", 206 GroupFormat: "map", 207 }) 208 suite.T().Log("Finished running line #27") 209 } 210 211 { 212 // math_logic/logic.yaml line #28 213 /* false */ 214 var expected_ bool = false 215 /* r.expr(true).and_(false) */ 216 217 suite.T().Log("About to run line #28: r.Expr(true).And(false)") 218 219 runAndAssert(suite.Suite, expected_, r.Expr(true).And(false), suite.session, r.RunOpts{ 220 GeometryFormat: "raw", 221 GroupFormat: "map", 222 }) 223 suite.T().Log("Finished running line #28") 224 } 225 226 { 227 // math_logic/logic.yaml line #29 228 /* false */ 229 var expected_ bool = false 230 /* r.expr(false).and_(false) */ 231 232 suite.T().Log("About to run line #29: r.Expr(false).And(false)") 233 234 runAndAssert(suite.Suite, expected_, r.Expr(false).And(false), suite.session, r.RunOpts{ 235 GeometryFormat: "raw", 236 GroupFormat: "map", 237 }) 238 suite.T().Log("Finished running line #29") 239 } 240 241 { 242 // math_logic/logic.yaml line #48 243 /* true */ 244 var expected_ bool = true 245 /* r.expr(true) | true */ 246 247 suite.T().Log("About to run line #48: r.Expr(true).Or(true)") 248 249 runAndAssert(suite.Suite, expected_, r.Expr(true).Or(true), suite.session, r.RunOpts{ 250 GeometryFormat: "raw", 251 GroupFormat: "map", 252 }) 253 suite.T().Log("Finished running line #48") 254 } 255 256 { 257 // math_logic/logic.yaml line #49 258 /* true */ 259 var expected_ bool = true 260 /* r.expr(true) | false */ 261 262 suite.T().Log("About to run line #49: r.Expr(true).Or(false)") 263 264 runAndAssert(suite.Suite, expected_, r.Expr(true).Or(false), suite.session, r.RunOpts{ 265 GeometryFormat: "raw", 266 GroupFormat: "map", 267 }) 268 suite.T().Log("Finished running line #49") 269 } 270 271 { 272 // math_logic/logic.yaml line #50 273 /* true */ 274 var expected_ bool = true 275 /* true | r.expr(true) */ 276 277 suite.T().Log("About to run line #50: r.Or(true, r.Expr(true))") 278 279 runAndAssert(suite.Suite, expected_, r.Or(true, r.Expr(true)), suite.session, r.RunOpts{ 280 GeometryFormat: "raw", 281 GroupFormat: "map", 282 }) 283 suite.T().Log("Finished running line #50") 284 } 285 286 { 287 // math_logic/logic.yaml line #51 288 /* true */ 289 var expected_ bool = true 290 /* true | r.expr(false) */ 291 292 suite.T().Log("About to run line #51: r.Or(true, r.Expr(false))") 293 294 runAndAssert(suite.Suite, expected_, r.Or(true, r.Expr(false)), suite.session, r.RunOpts{ 295 GeometryFormat: "raw", 296 GroupFormat: "map", 297 }) 298 suite.T().Log("Finished running line #51") 299 } 300 301 { 302 // math_logic/logic.yaml line #52 303 /* true */ 304 var expected_ bool = true 305 /* r.or_(true,true) */ 306 307 suite.T().Log("About to run line #52: r.Or(true, true)") 308 309 runAndAssert(suite.Suite, expected_, r.Or(true, true), suite.session, r.RunOpts{ 310 GeometryFormat: "raw", 311 GroupFormat: "map", 312 }) 313 suite.T().Log("Finished running line #52") 314 } 315 316 { 317 // math_logic/logic.yaml line #53 318 /* true */ 319 var expected_ bool = true 320 /* r.or_(true,false) */ 321 322 suite.T().Log("About to run line #53: r.Or(true, false)") 323 324 runAndAssert(suite.Suite, expected_, r.Or(true, false), suite.session, r.RunOpts{ 325 GeometryFormat: "raw", 326 GroupFormat: "map", 327 }) 328 suite.T().Log("Finished running line #53") 329 } 330 331 { 332 // math_logic/logic.yaml line #54 333 /* true */ 334 var expected_ bool = true 335 /* r.expr(true).or_(true) */ 336 337 suite.T().Log("About to run line #54: r.Expr(true).Or(true)") 338 339 runAndAssert(suite.Suite, expected_, r.Expr(true).Or(true), suite.session, r.RunOpts{ 340 GeometryFormat: "raw", 341 GroupFormat: "map", 342 }) 343 suite.T().Log("Finished running line #54") 344 } 345 346 { 347 // math_logic/logic.yaml line #55 348 /* true */ 349 var expected_ bool = true 350 /* r.expr(true).or_(false) */ 351 352 suite.T().Log("About to run line #55: r.Expr(true).Or(false)") 353 354 runAndAssert(suite.Suite, expected_, r.Expr(true).Or(false), suite.session, r.RunOpts{ 355 GeometryFormat: "raw", 356 GroupFormat: "map", 357 }) 358 suite.T().Log("Finished running line #55") 359 } 360 361 { 362 // math_logic/logic.yaml line #72 363 /* false */ 364 var expected_ bool = false 365 /* r.expr(false) | false */ 366 367 suite.T().Log("About to run line #72: r.Expr(false).Or(false)") 368 369 runAndAssert(suite.Suite, expected_, r.Expr(false).Or(false), suite.session, r.RunOpts{ 370 GeometryFormat: "raw", 371 GroupFormat: "map", 372 }) 373 suite.T().Log("Finished running line #72") 374 } 375 376 { 377 // math_logic/logic.yaml line #73 378 /* false */ 379 var expected_ bool = false 380 /* false | r.expr(false) */ 381 382 suite.T().Log("About to run line #73: r.Or(false, r.Expr(false))") 383 384 runAndAssert(suite.Suite, expected_, r.Or(false, r.Expr(false)), suite.session, r.RunOpts{ 385 GeometryFormat: "raw", 386 GroupFormat: "map", 387 }) 388 suite.T().Log("Finished running line #73") 389 } 390 391 { 392 // math_logic/logic.yaml line #74 393 /* false */ 394 var expected_ bool = false 395 /* r.and_(false,false) */ 396 397 suite.T().Log("About to run line #74: r.And(false, false)") 398 399 runAndAssert(suite.Suite, expected_, r.And(false, false), suite.session, r.RunOpts{ 400 GeometryFormat: "raw", 401 GroupFormat: "map", 402 }) 403 suite.T().Log("Finished running line #74") 404 } 405 406 { 407 // math_logic/logic.yaml line #75 408 /* false */ 409 var expected_ bool = false 410 /* r.expr(false).and_(false) */ 411 412 suite.T().Log("About to run line #75: r.Expr(false).And(false)") 413 414 runAndAssert(suite.Suite, expected_, r.Expr(false).And(false), suite.session, r.RunOpts{ 415 GeometryFormat: "raw", 416 GroupFormat: "map", 417 }) 418 suite.T().Log("Finished running line #75") 419 } 420 421 { 422 // math_logic/logic.yaml line #88 423 /* false */ 424 var expected_ bool = false 425 /* ~r.expr(True) */ 426 427 suite.T().Log("About to run line #88: r.Expr(true).Not()") 428 429 runAndAssert(suite.Suite, expected_, r.Expr(true).Not(), suite.session, r.RunOpts{ 430 GeometryFormat: "raw", 431 GroupFormat: "map", 432 }) 433 suite.T().Log("Finished running line #88") 434 } 435 436 { 437 // math_logic/logic.yaml line #89 438 /* false */ 439 var expected_ bool = false 440 /* r.not_(True) */ 441 442 suite.T().Log("About to run line #89: r.Not(true)") 443 444 runAndAssert(suite.Suite, expected_, r.Not(true), suite.session, r.RunOpts{ 445 GeometryFormat: "raw", 446 GroupFormat: "map", 447 }) 448 suite.T().Log("Finished running line #89") 449 } 450 451 { 452 // math_logic/logic.yaml line #93 453 /* true */ 454 var expected_ bool = true 455 /* ~r.expr(False) */ 456 457 suite.T().Log("About to run line #93: r.Expr(false).Not()") 458 459 runAndAssert(suite.Suite, expected_, r.Expr(false).Not(), suite.session, r.RunOpts{ 460 GeometryFormat: "raw", 461 GroupFormat: "map", 462 }) 463 suite.T().Log("Finished running line #93") 464 } 465 466 { 467 // math_logic/logic.yaml line #94 468 /* true */ 469 var expected_ bool = true 470 /* r.not_(False) */ 471 472 suite.T().Log("About to run line #94: r.Not(false)") 473 474 runAndAssert(suite.Suite, expected_, r.Not(false), suite.session, r.RunOpts{ 475 GeometryFormat: "raw", 476 GroupFormat: "map", 477 }) 478 suite.T().Log("Finished running line #94") 479 } 480 481 { 482 // math_logic/logic.yaml line #97 483 /* false */ 484 var expected_ bool = false 485 /* r.expr(True).not_() */ 486 487 suite.T().Log("About to run line #97: r.Expr(true).Not()") 488 489 runAndAssert(suite.Suite, expected_, r.Expr(true).Not(), suite.session, r.RunOpts{ 490 GeometryFormat: "raw", 491 GroupFormat: "map", 492 }) 493 suite.T().Log("Finished running line #97") 494 } 495 496 { 497 // math_logic/logic.yaml line #100 498 /* true */ 499 var expected_ bool = true 500 /* r.expr(False).not_() */ 501 502 suite.T().Log("About to run line #100: r.Expr(false).Not()") 503 504 runAndAssert(suite.Suite, expected_, r.Expr(false).Not(), suite.session, r.RunOpts{ 505 GeometryFormat: "raw", 506 GroupFormat: "map", 507 }) 508 suite.T().Log("Finished running line #100") 509 } 510 511 { 512 // math_logic/logic.yaml line #107 513 /* true */ 514 var expected_ bool = true 515 /* ~r.and_(True, True) == r.or_(~r.expr(True), ~r.expr(True)) */ 516 517 suite.T().Log("About to run line #107: r.And(true, true).Not().Eq(r.Or(r.Expr(true).Not(), r.Expr(true).Not()))") 518 519 runAndAssert(suite.Suite, expected_, r.And(true, true).Not().Eq(r.Or(r.Expr(true).Not(), r.Expr(true).Not())), suite.session, r.RunOpts{ 520 GeometryFormat: "raw", 521 GroupFormat: "map", 522 }) 523 suite.T().Log("Finished running line #107") 524 } 525 526 { 527 // math_logic/logic.yaml line #108 528 /* true */ 529 var expected_ bool = true 530 /* ~r.and_(True, False) == r.or_(~r.expr(True), ~r.expr(False)) */ 531 532 suite.T().Log("About to run line #108: r.And(true, false).Not().Eq(r.Or(r.Expr(true).Not(), r.Expr(false).Not()))") 533 534 runAndAssert(suite.Suite, expected_, r.And(true, false).Not().Eq(r.Or(r.Expr(true).Not(), r.Expr(false).Not())), suite.session, r.RunOpts{ 535 GeometryFormat: "raw", 536 GroupFormat: "map", 537 }) 538 suite.T().Log("Finished running line #108") 539 } 540 541 { 542 // math_logic/logic.yaml line #109 543 /* true */ 544 var expected_ bool = true 545 /* ~r.and_(False, False) == r.or_(~r.expr(False), ~r.expr(False)) */ 546 547 suite.T().Log("About to run line #109: r.And(false, false).Not().Eq(r.Or(r.Expr(false).Not(), r.Expr(false).Not()))") 548 549 runAndAssert(suite.Suite, expected_, r.And(false, false).Not().Eq(r.Or(r.Expr(false).Not(), r.Expr(false).Not())), suite.session, r.RunOpts{ 550 GeometryFormat: "raw", 551 GroupFormat: "map", 552 }) 553 suite.T().Log("Finished running line #109") 554 } 555 556 { 557 // math_logic/logic.yaml line #110 558 /* true */ 559 var expected_ bool = true 560 /* ~r.and_(False, True) == r.or_(~r.expr(False), ~r.expr(True)) */ 561 562 suite.T().Log("About to run line #110: r.And(false, true).Not().Eq(r.Or(r.Expr(false).Not(), r.Expr(true).Not()))") 563 564 runAndAssert(suite.Suite, expected_, r.And(false, true).Not().Eq(r.Or(r.Expr(false).Not(), r.Expr(true).Not())), suite.session, r.RunOpts{ 565 GeometryFormat: "raw", 566 GroupFormat: "map", 567 }) 568 suite.T().Log("Finished running line #110") 569 } 570 571 { 572 // math_logic/logic.yaml line #120 573 /* true */ 574 var expected_ bool = true 575 /* r.and_(True, True, True, True, True) */ 576 577 suite.T().Log("About to run line #120: r.And(true, true, true, true, true)") 578 579 runAndAssert(suite.Suite, expected_, r.And(true, true, true, true, true), suite.session, r.RunOpts{ 580 GeometryFormat: "raw", 581 GroupFormat: "map", 582 }) 583 suite.T().Log("Finished running line #120") 584 } 585 586 { 587 // math_logic/logic.yaml line #123 588 /* false */ 589 var expected_ bool = false 590 /* r.and_(True, True, True, False, True) */ 591 592 suite.T().Log("About to run line #123: r.And(true, true, true, false, true)") 593 594 runAndAssert(suite.Suite, expected_, r.And(true, true, true, false, true), suite.session, r.RunOpts{ 595 GeometryFormat: "raw", 596 GroupFormat: "map", 597 }) 598 suite.T().Log("Finished running line #123") 599 } 600 601 { 602 // math_logic/logic.yaml line #126 603 /* false */ 604 var expected_ bool = false 605 /* r.and_(True, False, True, False, True) */ 606 607 suite.T().Log("About to run line #126: r.And(true, false, true, false, true)") 608 609 runAndAssert(suite.Suite, expected_, r.And(true, false, true, false, true), suite.session, r.RunOpts{ 610 GeometryFormat: "raw", 611 GroupFormat: "map", 612 }) 613 suite.T().Log("Finished running line #126") 614 } 615 616 { 617 // math_logic/logic.yaml line #129 618 /* false */ 619 var expected_ bool = false 620 /* r.or_(False, False, False, False, False) */ 621 622 suite.T().Log("About to run line #129: r.Or(false, false, false, false, false)") 623 624 runAndAssert(suite.Suite, expected_, r.Or(false, false, false, false, false), suite.session, r.RunOpts{ 625 GeometryFormat: "raw", 626 GroupFormat: "map", 627 }) 628 suite.T().Log("Finished running line #129") 629 } 630 631 { 632 // math_logic/logic.yaml line #132 633 /* true */ 634 var expected_ bool = true 635 /* r.or_(False, False, False, True, False) */ 636 637 suite.T().Log("About to run line #132: r.Or(false, false, false, true, false)") 638 639 runAndAssert(suite.Suite, expected_, r.Or(false, false, false, true, false), suite.session, r.RunOpts{ 640 GeometryFormat: "raw", 641 GroupFormat: "map", 642 }) 643 suite.T().Log("Finished running line #132") 644 } 645 646 { 647 // math_logic/logic.yaml line #135 648 /* true */ 649 var expected_ bool = true 650 /* r.or_(False, True, False, True, False) */ 651 652 suite.T().Log("About to run line #135: r.Or(false, true, false, true, false)") 653 654 runAndAssert(suite.Suite, expected_, r.Or(false, true, false, true, false), suite.session, r.RunOpts{ 655 GeometryFormat: "raw", 656 GroupFormat: "map", 657 }) 658 suite.T().Log("Finished running line #135") 659 } 660 661 { 662 // math_logic/logic.yaml line #140 663 /* err("ReqlQueryLogicError", "Cannot perform bracket on a non-object non-sequence `\"a\"`.", []) */ 664 var expected_ Err = err("ReqlQueryLogicError", "Cannot perform bracket on a non-object non-sequence `\"a\"`.") 665 /* r.expr(r.expr('a')['b']).default(2) */ 666 667 suite.T().Log("About to run line #140: r.Expr(r.Expr('a').AtIndex('b')).Default(2)") 668 669 runAndAssert(suite.Suite, expected_, r.Expr(r.Expr("a").AtIndex("b")).Default(2), suite.session, r.RunOpts{ 670 GeometryFormat: "raw", 671 GroupFormat: "map", 672 }) 673 suite.T().Log("Finished running line #140") 674 } 675 676 { 677 // math_logic/logic.yaml line #145 678 /* False */ 679 var expected_ bool = false 680 /* r.expr(r.and_(True, False) == r.or_(False, True)) */ 681 682 suite.T().Log("About to run line #145: r.Expr(r.And(true, false).Eq(r.Or(false, true)))") 683 684 runAndAssert(suite.Suite, expected_, r.Expr(r.And(true, false).Eq(r.Or(false, true))), suite.session, r.RunOpts{ 685 GeometryFormat: "raw", 686 GroupFormat: "map", 687 }) 688 suite.T().Log("Finished running line #145") 689 } 690 691 { 692 // math_logic/logic.yaml line #151 693 /* False */ 694 var expected_ bool = false 695 /* r.expr(r.and_(True, False) >= r.or_(False, True)) */ 696 697 suite.T().Log("About to run line #151: r.Expr(r.And(true, false).Ge(r.Or(false, true)))") 698 699 runAndAssert(suite.Suite, expected_, r.Expr(r.And(true, false).Ge(r.Or(false, true))), suite.session, r.RunOpts{ 700 GeometryFormat: "raw", 701 GroupFormat: "map", 702 }) 703 suite.T().Log("Finished running line #151") 704 } 705 706 { 707 // math_logic/logic.yaml line #156 708 /* true */ 709 var expected_ bool = true 710 /* r.expr(1) & True */ 711 712 suite.T().Log("About to run line #156: r.Expr(1).And(true)") 713 714 runAndAssert(suite.Suite, expected_, r.Expr(1).And(true), suite.session, r.RunOpts{ 715 GeometryFormat: "raw", 716 GroupFormat: "map", 717 }) 718 suite.T().Log("Finished running line #156") 719 } 720 721 { 722 // math_logic/logic.yaml line #160 723 /* ("str") */ 724 var expected_ string = "str" 725 /* r.expr(False) | 'str' */ 726 727 suite.T().Log("About to run line #160: r.Expr(false).Or('str')") 728 729 runAndAssert(suite.Suite, expected_, r.Expr(false).Or("str"), suite.session, r.RunOpts{ 730 GeometryFormat: "raw", 731 GroupFormat: "map", 732 }) 733 suite.T().Log("Finished running line #160") 734 } 735 736 { 737 // math_logic/logic.yaml line #164 738 /* false */ 739 var expected_ bool = false 740 /* ~r.expr(1) */ 741 742 suite.T().Log("About to run line #164: r.Expr(1).Not()") 743 744 runAndAssert(suite.Suite, expected_, r.Expr(1).Not(), suite.session, r.RunOpts{ 745 GeometryFormat: "raw", 746 GroupFormat: "map", 747 }) 748 suite.T().Log("Finished running line #164") 749 } 750 751 { 752 // math_logic/logic.yaml line #168 753 /* true */ 754 var expected_ bool = true 755 /* ~r.expr(null) */ 756 757 suite.T().Log("About to run line #168: r.Expr(nil).Not()") 758 759 runAndAssert(suite.Suite, expected_, r.Expr(nil).Not(), suite.session, r.RunOpts{ 760 GeometryFormat: "raw", 761 GroupFormat: "map", 762 }) 763 suite.T().Log("Finished running line #168") 764 } 765 }