GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — BE_BETWEEN should report better on Type mismatch · Issue #1108 · utPLSQL/utPLSQL

BE_BETWEEN should report better on Type mismatch #1108

New issue
Copy link
New issue
Copy link
Open
Open
BE_BETWEEN should report better on Type mismatch#1108
Copy link
Assignees
lwasylowpesse
Labels
enhancement

Description

@pesse
pesse
opened on Nov 12, 2020
Issue body actions

Describe the bug
Different to all the comparison matchers, BE_BETWEEN does not give away details of a type mismatch in its error message. It would be very helpful to have these details, for example when accidentially comparing timestamp with timestamp with timezone.

Internally, BE_BETWEEN should probably also fail on mismatch of upper and lower bound (this might not happen at the moment, but I would like to have a check in the Matcher itself to make it more error-proof)

Provide version info
Latest utPLSQL version, all databases

Information about client software
Independent from client

To Reproduce

begin
    -- Shows exactly *why* it fails
    ut.expect(to_timestamp(current_timestamp)).to_equal(current_timestamp);
    -- Gives only a generic "cannot be used with" - no indication what kind of datatype the matcher is initialized with
    ut.expect(to_timestamp(current_timestamp)).to_be_between(current_timestamp-interval '5' second, current_timestamp);
end;
/

Message: The matcher 'be between' cannot be used with data type (timestamp).

Expected behavior
Similar description as with the comparison-Matchers, like:
Actual (timestamp with timezone) cannot be compared to Expected (timestamp) using matcher 'be between'.

Activity

  1. pesse commented on Nov 12, 2020

    @pesse
    pesse
    on Nov 12, 2020
    MemberAuthor
    More actions

    I would like to implement this myself

  2. pesse
    self-assigned this
    on Nov 12, 2020
  3. lwasylow
    added
    enhancement
    on Jan 30, 2022
  4. lwasylow commented on Feb 2, 2022

    @lwasylow
    lwasylow
    on Feb 2, 2022
    Member
    More actions

    Hi @pesse, you still want to look at that one or you of for me to pick it up ?

  5. pesse commented on Feb 3, 2022

    @pesse
    pesse
    on Feb 3, 2022
    MemberAuthor
    More actions

    Haha, please pick it up. Once I find time and energy to get into the project again, I have loads of stuff to do with cli and java-api

    Reacted by Lukasz Wasylow
  6. lwasylow
    self-assigned this
    on Feb 8, 2022
  7. lwasylow commented on Feb 8, 2022

    @lwasylow
    lwasylow
    on Feb 8, 2022
    Member
    More actions

    So I'm not entirely sure that this is a valid message.
    Its produced by ut_matcher in opposite to ut_equal generated by ut_comparision_matcher.
    The similar situation we have for to_be_like or have_count.
    Unless we want to create customized messages for each of these matchers ?
    @jgebal @pesse , what's your thought

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @lwasylow
    lwasylow
  • @pesse
    pesse

Labels

enhancement

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402503 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.