<commit_before>package io.kotlintest.matchers.doubles

import io.kotlintest.Matcher
import io.kotlintest.Result
import io.kotlintest.shouldBe
import io.kotlintest.shouldNotBe

/**
 * Asserts that this [Double] is negative
 *
 * Verifies that this [Double] has a value lower than 0.0.
 * Opposite of [Double.shouldNotBeNegative]
 *
 * ```
 * 0.1.shouldBeNegative()      // Assertion fails
 * (-0.1).shouldBeNegative()   // Assertion passes
 * ```
 */
fun Double.shouldBeNegative() = this shouldBe negative()

/**
 * Asserts that this [Double] is not negative
 *
 * Verifies that this [Double] does not have a value lower than 0.0.
 * Opposite of [Double.shouldBeNegative]
 *
 * ```
 * 0.1.shouldNotBeNegative()      // Assertion passes
 * (-0.1).shouldNotBeNegative()   // Assertion fails
 * ```
 */
fun Double.shouldNotBeNegative() = this shouldNotBe negative()

fun negative() = object : Matcher<Double> {
    override fun test(value: Double) = Result(value < 0.0, "$value should be < 0.0", "$value should not be < 0.0")
}<commit_msg>Adds references for the "Positive" matchers to the "Negative" matchers documentation<commit_after>package io.kotlintest.matchers.doubles

import io.kotlintest.Matcher
import io.kotlintest.Result
import io.kotlintest.shouldBe
import io.kotlintest.shouldNotBe

/**
 * Asserts that this [Double] is negative
 *
 * Verifies that this [Double] has a value lower than 0.0.
 * Opposite of [Double.shouldNotBeNegative]
 *
 * ```
 * 0.1.shouldBeNegative()      // Assertion fails
 * (-0.1).shouldBeNegative()   // Assertion passes
 * ```
 *
 * @see [Double.shouldBePositive]
 * @see [Double.shouldNotBePositive]
 */
fun Double.shouldBeNegative() = this shouldBe negative()

/**
 * Asserts that this [Double] is not negative
 *
 * Verifies that this [Double] does not have a value lower than 0.0.
 * Opposite of [Double.shouldBeNegative]
 *
 * ```
 * 0.1.shouldNotBeNegative()      // Assertion passes
 * (-0.1).shouldNotBeNegative()   // Assertion fails
 * ```
 *
 * @see [Double.shouldBePositive]
 * @see [Double.shouldNotBePositive]
 */
fun Double.shouldNotBeNegative() = this shouldNotBe negative()

fun negative() = object : Matcher<Double> {
    override fun test(value: Double) = Result(value < 0.0, "$value should be < 0.0", "$value should not be < 0.0")
}
{'fraction_non_alphanumeric': 0.13543031891655744, 'fraction_numerical': 0.015727391874180863, 'mean_word_length': 3.88272921108742, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4943507', 'n_tokens_mistral': 768, 'n_tokens_neox': 722, 'n_words': 202}