Menu

#18 add assertion "assertAssociated"

closed
None
1
2014-12-12
2014-04-26
Tom Clune
No

Two forms:

assertAssociated(ptr) raises exception if associated(ptr) is false
assertAssociated(a,b) rasises exception if associated(a,b) is false

Also two forms for the opposite "unassociated" case.

Also need @ annotations for both cases.

Related

Feature Requests: #18

Discussion

  • Michael L. Rilee

    I take it we'll need generated code to cover all of the type-kind-ranks we'll run into. Any shortcuts?

     
    • Tom Clune

      Tom Clune - 2014-04-26

      On Apr 26, 2014, at 4:26 PM, "Michael L. Rilee" mlrilee@users.sf.net wrote:

      I take it we'll need generated code to cover all of the type-kind-ranks we'll run into. Any shortcuts?

      I was not thinking very clearly when I submitted this. I think this greatly lowers the priority in my mind, unless it is very easy to adapt from your existing code.

      Hmm, thinking. If we expanded the macro

      @assertAssociated(ptr[,…]) => call assertTrue(associated(ptr)[, …])

      The compiler would do all the overloading. That's probably better than doing the overloading ourselves. (Wish I could claim I was thinking along these lines when I opened the request.)

      [feature-requests:#18] add assertion "assertAssociated"

      Status: open
      Group: Current Release Upgrade (v2)
      Created: Sat Apr 26, 2014 03:42 PM UTC by Tom Clune
      Last Updated: Sat Apr 26, 2014 03:42 PM UTC
      Owner: Tom Clune

      Two forms:

      assertAssociated(ptr) raises exception if associated(ptr) is false
      assertAssociated(a,b) rasises exception if associated(a,b) is false

      Also two forms for the opposite "unassociated" case.

      Also need @ annotations for both cases.

      Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/pfunit/feature-requests/18/

      To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/

      Thomas Clune, Ph. D. Thomas.L.Clune@nasa.gov
      CISTO Code 606.0
      NASA GSFC 301-286-4635
      MS 610.8 B33-C128
      Greenbelt, MD 20771

       

      Related

      Feature Requests: #18

  • Michael L. Rilee

    • Group: Version 2 Upgrade --> Development
     
  • Michael L. Rilee

    • Priority: 5 --> 1
     
  • Michael L. Rilee

    Provided @assertAssociated(ptr) and @assertAssociatedWith(ptr,tgt). These map to call assertTrue(associated(...)) to let the compiler do the type checking. We did not implement assertAssociated* subroutines. We also provide @assertUnAssociated (and With) that map to assertFalse.

     
  • Michael L. Rilee

    • status: open --> closed
     

Log in to post a comment.