Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Kotlin contracts to exposed Kotlin API #3259

Open
wants to merge 18 commits into
base: main
Choose a base branch
from

Commits on Aug 10, 2023

  1. Added contracts for kotlin assertions

    Added assertNull and assertNotNull methods with contracts.
    Added contracts for assertThrows and assertDoesNotThrow methods.
    
    assertInstanceOf can be implemented only with kotlin 1.4, because
    refined generics
    [are not supported](https://youtrack.jetbrains.com/issue/KT-28298)
    in contracts for kotlin 1.3 yet.
    
    Issue: junit-team#1866
    awelless committed Aug 10, 2023
    Configuration menu
    Copy the full SHA
    e3b3ac3 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    edbe73f View commit details
    Browse the repository at this point in the history
  3. Mark new kotlin assetion methods as experimental

    Kotlin assertNull and assertNotNull methods are marked as
    experimental.
    
    Issue: junit-team#1866
    awelless committed Aug 10, 2023
    Configuration menu
    Copy the full SHA
    252cad2 View commit details
    Browse the repository at this point in the history
  4. Adjust assertThrows contract

    Lambda invoked in assertThrows is marked as being called UNKNOWN number
    of times, since contracts do nothing with exception suppression
    
    Issue: junit-team#1866
    awelless committed Aug 10, 2023
    Configuration menu
    Copy the full SHA
    1d5811b View commit details
    Browse the repository at this point in the history
  5. Add contract for fail

    Created another fail method with a non-nullable lambda parameter
    
    Issue: junit-team#1866
    awelless committed Aug 10, 2023
    Configuration menu
    Copy the full SHA
    19922d6 View commit details
    Browse the repository at this point in the history

Commits on Aug 25, 2023

  1. Don't return a value from assertNotNull

    Because of kotlin smart casts, there is no need to return a
    non-nullable value from `assertNotNull` methods
    
    Issue: junit-team#1866
    awelless committed Aug 25, 2023
    Configuration menu
    Copy the full SHA
    eccb259 View commit details
    Browse the repository at this point in the history
  2. Increase API version

    Api version is increased to 5.11 for `assertNull` and `assertNotNull`
    methods
    
    Issue: junit-team#1866
    awelless committed Aug 25, 2023
    Configuration menu
    Copy the full SHA
    e427978 View commit details
    Browse the repository at this point in the history
  3. Add assertInstanceOf methods

    Added `assertInstanceOf` assertions with upcasting contracts
    
    Issue: junit-team#1866
    awelless committed Aug 25, 2023
    Configuration menu
    Copy the full SHA
    544b4e1 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    437d29e View commit details
    Browse the repository at this point in the history

Commits on Aug 27, 2023

  1. Configuration menu
    Copy the full SHA
    43c08ea View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    ff9fd39 View commit details
    Browse the repository at this point in the history

Commits on Sep 1, 2023

  1. Configuration menu
    Copy the full SHA
    5a70965 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    666f73f View commit details
    Browse the repository at this point in the history
  3. Make the comments be sentences

    awelless committed Sep 1, 2023
    Configuration menu
    Copy the full SHA
    9920cf9 View commit details
    Browse the repository at this point in the history
  4. Adjust contract for assertTimeoutPreemptively

    Invocation kind for the executable is UNKNOWN for
    assertTimeoutPreemptively methods
    
    Issue: junit-team#1866
    awelless committed Sep 1, 2023
    Configuration menu
    Copy the full SHA
    4d21486 View commit details
    Browse the repository at this point in the history

Commits on Sep 8, 2023

  1. Configuration menu
    Copy the full SHA
    30b9b78 View commit details
    Browse the repository at this point in the history

Commits on Sep 23, 2023

  1. Configuration menu
    Copy the full SHA
    41f00c0 View commit details
    Browse the repository at this point in the history

Commits on Dec 15, 2023

  1. Configuration menu
    Copy the full SHA
    69e9c38 View commit details
    Browse the repository at this point in the history