<commit_before>// Copyright (c) 2013-2018 <NAME> and Contributors
// This software is licensed under the MIT License (MIT).
// For more information see LICENSE or https://opensource.org/licenses/MIT

package doobie.syntax

import cats.implicits._
import doobie.implicits._
import org.specs2.mutable.Specification

@SuppressWarnings(Array("org.wartremover.warts.NonUnitStatements"))
object putspec extends Specification {

  "put syntax" should {

    "convert to a fragment" in {
      fr"SELECT" ++ 1.fr
      true
    }

    "convert to a fragment0" in {
      fr"SELECT" ++ 1.fr0
      true
    }
    
    "convert an option to a fragment" in {
      fr"SELECT" ++ Some(1).fr
      true
    }

    "convert an option to a fragment0" in {
      fr"SELECT" ++ Some(1).fr0
      true
    }

    "work in a map" in {
      List(1, 2, 3).map(_.fr).combineAll
      true
    }

    "work in a map with fr0" in {
      List(1, 2, 3).map(_.fr0).combineAll<commit_msg>Simplified map + combinaAll to foldMap<commit_after>// Copyright (c) 2013-2018 <NAME> and Contributors
// This software is licensed under the MIT License (MIT).
// For more information see LICENSE or https://opensource.org/licenses/MIT

package doobie.syntax

import cats.implicits._
import doobie.implicits._
import org.specs2.mutable.Specification

@SuppressWarnings(Array("org.wartremover.warts.NonUnitStatements"))
object putspec extends Specification {

  "put syntax" should {

    "convert to a fragment" in {
      fr"SELECT" ++ 1.fr
      true
    }

    "convert to a fragment0" in {
      fr"SELECT" ++ 1.fr0
      true
    }
    
    "convert an option to a fragment" in {
      fr"SELECT" ++ Some(1).fr
      true
    }

    "convert an option to a fragment0" in {
      fr"SELECT" ++ Some(1).fr0
      true
    }

    "work in a map" in {
      List(1, 2, 3).foldMap(_.fr)
      true
    }

    "work in a map with fr0" in {
      List(1, 2, 3).foldMap(_.fr0)
{'fraction_non_alphanumeric': 0.11317829457364341, 'fraction_numerical': 0.025839793281653745, 'mean_word_length': 2.5328467153284673, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 2, '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': '5825654', 'n_tokens_mistral': 675, 'n_tokens_neox': 640, 'n_words': 191}