stdlib tests now check refc too (#21664)

* stdlib tests now check refc too

* typo

* fixes line numbers

* disable cpp

* do not touch
This commit is contained in:
ringabout
2023-04-21 21:37:58 +08:00
committed by GitHub
parent 48de0d0cf4
commit 4fa86422c0
140 changed files with 256 additions and 39 deletions

View File

@@ -1,5 +1,5 @@
discard """
target: "c cpp"
targets: "c cpp"
disabled: windows
"""
# bug #21116

View File

@@ -1,6 +1,6 @@
discard """
matrix: "--gc:refc; --gc:arc; --gc:orc"
target: "c"
targets: "c"
"""
when compileOption("gc", "refc") or not defined(openbsd):

View File

@@ -1,7 +1,7 @@
discard """
output: "Exit 1\nExit 2"
matrix: "--gc:refc; --gc:arc; --gc:orc"
target: "c"
targets: "c"
"""
when compileOption("gc", "refc") or not defined(openbsd):

View File

@@ -1,6 +1,6 @@
discard """
action: "run"
target: "js"
targets: "js"
cmd: "nim js -r -d:nodejs $options --sourceMap:on $file"
"""
import std/[os, json, strutils, sequtils, algorithm, assertions, paths, compilesettings]

View File

@@ -1,5 +1,5 @@
discard """
matrix: "--threads:on"
matrix: "--mm:refc; --mm:orc"
errormsg: "'spawn'ed function cannot have a 'typed' or 'untyped' parameter"
"""

View File

@@ -1,5 +1,5 @@
discard """
matrix: "--threads:on"
matrix: "--mm:refc; --mm:orc"
errormsg: "'spawn' takes a call expression; got: proc (x: uint32) = echo [x]"
"""

View File

@@ -1,5 +1,5 @@
discard """
matrix: "--threads:on"
matrix: "--mm:refc; --mm:orc"
errormsg: "'spawn'ed function cannot have a 'typed' or 'untyped' parameter"
"""

View File

@@ -1,7 +1,7 @@
discard """
action: reject
cmd: '''nim check $options $file'''
matrix: "; -d:testWithout"
matrix: "; -d:testWithout; --mm:refc"
"""
when not defined(testWithout): # test for same errors before and after

View File

@@ -22,7 +22,7 @@ heyho
Val1
Val1
'''
matrix: "--hints:off"
matrix: "--hints:off --mm:orc; --hints:off --mm:refc"
"""
import macros

View File

@@ -1,3 +1,7 @@
discard """
matrix: "--mm:refc; --mm:orc"
"""
# test atomic operations
import std/[atomics, bitops]

View File

@@ -1,4 +1,5 @@
discard """
matrix: "--mm:refc; --mm:orc"
targets: "c cpp"
"""
import std/atomics

View File

@@ -1,5 +1,6 @@
discard """
targets: "c js"
matrix: "--mm:refc; --mm:orc"
output:'''@["3", "2", "1"]
'''
"""

View File

@@ -1,4 +1,5 @@
discard """
matrix: "--mm:refc; --mm:orc"
targets: "c cpp js"
"""
import std/assertions

View File

@@ -1,5 +1,5 @@
discard """
matrix: "--gc:arc --threads:on; --gc:arc --threads:on -d:danger; --threads:on"
matrix: "--mm:arc; --mm:arc -d:danger; --mm:refc"
disabled: "freebsd"
"""

View File

@@ -1,4 +1,5 @@
discard """
matrix: "--mm:refc; --mm:orc"
targets: "c js"
"""
import std/assertions

View File

@@ -1,5 +1,6 @@
discard """
nimout: "OK"
matrix: "--mm:refc; --mm:orc"
output: '''
OK
'''

View File

@@ -1,3 +1,7 @@
discard """
matrix: "--mm:refc; --mm:orc"
"""
import std/private/bitops_utils
import std/assertions

View File

@@ -1,3 +1,7 @@
discard """
matrix: "--mm:refc; --mm:orc"
"""
import std/unittest
import std/[cgi, strtabs, sugar]
import std/assertions

View File

@@ -1,4 +1,5 @@
discard """
matrix: "--mm:refc; --mm:orc"
targets: "c js"
joinable: false
"""

View File

@@ -1,3 +1,7 @@
discard """
matrix: "--mm:refc; --mm:orc"
"""
import std/[complex, math]
import std/assertions

View File

@@ -1,4 +1,5 @@
discard """
matrix: "--mm:refc; --mm:orc"
targets: "c js"
"""

View File

@@ -1,4 +1,5 @@
discard """
matrix: "--mm:refc; --mm:orc"
targets: "c js"
"""

View File

@@ -1,4 +1,5 @@
discard """
matrix: "--mm:refc; --mm:orc"
targets: "c cpp js"
"""

View File

@@ -1,4 +1,5 @@
discard """
matrix: "--mm:refc; --mm:orc"
targets: "c cpp js"
"""
import std/assertions

View File

@@ -1,5 +1,5 @@
discard """
matrix: "--gc:refc; --gc:orc"
matrix: "--mm:refc; --mm:orc"
targets: "c cpp js"
"""

View File

@@ -1,4 +1,5 @@
discard """
matrix: "--mm:refc; --mm:orc"
targets: "c js"
"""

View File

@@ -1,4 +1,5 @@
discard """
matrix: "--mm:refc; --mm:orc"
output: '''
[Suite] Integration with Nim

View File

@@ -1,3 +1,7 @@
discard """
matrix: "--mm:refc; --mm:orc"
"""
import std/editdistance
import std/assertions

View File

@@ -1,3 +1,7 @@
discard """
matrix: "--mm:refc; --mm:orc"
"""
import std/encodings
import std/assertions

View File

@@ -1,3 +1,7 @@
discard """
matrix: "--mm:refc; --mm:orc"
"""
import std/enumerate
import std/assertions

View File

@@ -1,4 +1,5 @@
discard """
matrix: "--mm:refc; --mm:orc"
targets: "c js"
"""

View File

@@ -1,5 +1,5 @@
discard """
matrix: "--threads:on"
matrix: "--mm:refc; --mm:orc"
joinable: false
targets: "c js cpp"
"""

View File

@@ -1,4 +1,5 @@
discard """
matrix: "--mm:refc; --mm:orc"
targets: "c cpp js"
output: '''
ok4

View File

@@ -1,7 +1,7 @@
discard """
exitcode: 0
output: ""
matrix: "; -d:nimInheritHandles"
matrix: "; -d:nimInheritHandles; --mm:refc"
joinable: false
"""

View File

@@ -1,4 +1,5 @@
discard """
matrix: "--mm:refc; --mm:orc"
targets: "js c cpp"
"""

View File

@@ -1,4 +1,5 @@
discard """
matrix: "--mm:refc; --mm:orc"
exitcode: 0
output: ""
"""

View File

@@ -1,4 +1,5 @@
discard """
matrix: "--mm:refc; --mm:orc"
output: "pcDir\npcFile\npcLinkToDir\npcLinkToFile\n"
joinable: false
"""

View File

@@ -1,3 +1,7 @@
discard """
matrix: "--mm:refc; --mm:orc"
"""
import nativesockets
import std/assertions

View File

@@ -1,3 +1,7 @@
discard """
matrix: "--mm:refc; --mm:orc"
"""
import std/private/globs
import std/assertions

View File

@@ -1,5 +1,5 @@
discard """
matrix: "; --backend:cpp; --backend:js --jsbigint64:on; --backend:js --jsbigint64:off"
matrix: "--mm:refc; --mm:orc; --backend:cpp; --backend:js --jsbigint64:on; --backend:js --jsbigint64:off"
"""
import std/hashes

View File

@@ -1,3 +1,7 @@
discard """
matrix: "--mm:refc; --mm:orc"
"""
import std/heapqueue
import std/assertions

View File

@@ -1,3 +1,6 @@
discard """
matrix: "--mm:refc; --mm:orc"
"""
import unittest, strutils
import ../../lib/packages/docutils/highlite

View File

@@ -1,4 +1,5 @@
discard """
matrix: "--mm:refc; --mm:orc"
targets: "c js"
output: '''
true

View File

@@ -1,3 +1,7 @@
discard """
matrix: "--mm:refc; --mm:orc"
"""
import httpcore, strutils
import std/assertions

View File

@@ -1,3 +1,7 @@
discard """
matrix: "--mm:refc; --mm:orc"
"""
import std/[importutils, assertions]
import stdtest/testutils
import mimportutils

View File

@@ -1,3 +1,7 @@
discard """
matrix: "--mm:refc; --mm:orc"
"""
# xxx move to here other tests that belong here; io is a proper module
import std/os

View File

@@ -1,5 +1,6 @@
discard """
output: ""
matrix: "--mm:refc; --mm:orc"
targets: "c js"
"""

View File

@@ -1,4 +1,5 @@
discard """
matrix: "--mm:refc; --mm:orc"
targets: "c cpp js"
"""

View File

@@ -1,4 +1,5 @@
discard """
matrix: "--mm:refc; --mm:orc"
targets: "c js"
"""

View File

@@ -1,6 +1,6 @@
discard """
targets: "c cpp js"
matrix: "--threads:on"
matrix: "--mm:refc; --mm:orc"
"""
#bug #6049

View File

@@ -1,3 +1,7 @@
discard """
matrix: "--mm:refc; --mm:orc"
"""
#[
xxx macros tests need to be reorganized to makes sure each API is tested once
See also:

View File

@@ -1,6 +1,6 @@
discard """
targets: "c cpp js"
matrix:"; -d:danger"
matrix:"; -d:danger; --mm:refc"
"""
# xxx: there should be a test with `-d:nimTmathCase2 -d:danger --passc:-ffast-math`,

View File

@@ -1,4 +1,5 @@
discard """
matrix: "--mm:refc; --mm:orc"
targets: "c cpp js"
"""

View File

@@ -1,4 +1,5 @@
discard """
matrix: "--mm:refc; --mm:orc"
output: '''Can't access 6
10
11

View File

@@ -1,4 +1,5 @@
discard """
matrix: "--mm:refc; --mm:orc"
targets: "c js"
"""

View File

@@ -1,4 +1,5 @@
discard """
matrix: "--mm:refc; --mm:orc"
targets: "c cpp js"
"""

View File

@@ -1,4 +1,5 @@
discard """
matrix: "--mm:refc; --mm:orc"
output: '''@[11, 12, 13]
@[11, 12, 13]
@[1, 3, 5]

View File

@@ -1,4 +1,5 @@
discard """
matrix: "--mm:refc; --mm:orc"
targets: "c js"
"""

View File

@@ -1,3 +1,7 @@
discard """
matrix: "--mm:refc; --mm:orc"
"""
import std/nativesockets
import stdtest/testutils
import std/assertions

View File

@@ -1,4 +1,5 @@
discard """
matrix: "--mm:refc; --mm:orc"
outputsub: ""
"""

View File

@@ -1,5 +1,6 @@
discard """
action: run
matrix: "--mm:refc; --mm:orc"
output: '''
[Suite] inet_ntop tests

View File

@@ -1,4 +1,5 @@
discard """
matrix: "--mm:refc; --mm:orc"
joinable: false
"""

View File

@@ -1,4 +1,5 @@
discard """
matrix: "--mm:refc; --mm:orc"
# Since the tests for nre are all bundled together we treat failure in one test as an nre failure
# When running 'testament/tester' a failed check() in the test suite will cause the exit
# codes to differ and be reported as a failure

View File

@@ -1,3 +1,7 @@
discard """
matrix: "--mm:refc; --mm:orc"
"""
import std/private/ntpath
import std/assertions

View File

@@ -1,3 +1,7 @@
discard """
matrix: "--mm:refc; --mm:orc"
"""
import std/wordwrap
import openssl
import std/assertions

View File

@@ -1,4 +1,5 @@
discard """
matrix: "--mm:refc; --mm:orc"
targets: "c js"
"""

View File

@@ -22,6 +22,7 @@ __really_obscure_dir_name/test
Raises
Raises
'''
matrix: "--mm:refc; --mm:orc"
joinable: false
"""
# test os path creation, iteration, and deletion

View File

@@ -1,4 +1,5 @@
discard """
matrix: "--mm:refc; --mm:orc"
disabled: "posix"
"""

View File

@@ -1,5 +1,5 @@
discard """
matrix: "--threads"
matrix: "--mm:refc; --mm:arc"
joinable: false
targets: "c js cpp"
"""

View File

@@ -1,4 +1,5 @@
discard """
matrix: "--mm:refc; --mm:orc"
joinable: false
"""

View File

@@ -1,7 +1,7 @@
discard """
cmd: "nim $target $options -r $file"
targets: "c cpp"
matrix: "--threads:on; "
matrix: "--mm:refc; --mm:orc"
"""
import os, osproc, times, std / monotimes

View File

@@ -1,3 +1,7 @@
discard """
matrix: "--mm:refc; --mm:orc"
"""
import std/packedsets
import std/sets

View File

@@ -1,4 +1,5 @@
discard """
matrix: "--mm:refc; --mm:orc"
targets: "c js"
"""

View File

@@ -1,3 +1,7 @@
discard """
matrix: "--mm:refc; --mm:orc"
"""
include parsecsv
import strutils, os
import std/assertions

View File

@@ -1,4 +1,5 @@
discard """
matrix: "--mm:refc; --mm:orc"
output: "all ok"
"""

View File

@@ -1,4 +1,5 @@
discard """
matrix: "--mm:refc; --mm:orc"
targets: "c js"
"""
import parsesql

View File

@@ -1,3 +1,7 @@
discard """
matrix: "--mm:refc; --mm:orc"
"""
import unittest, strutils
block: # parseutils

View File

@@ -1,4 +1,5 @@
discard """
matrix: "--mm:refc; --mm:orc"
targets: "c cpp"
"""

View File

@@ -1,4 +1,5 @@
discard """
matrix: "--mm:refc; --mm:orc"
"""
import std/os

View File

@@ -1,3 +1,7 @@
discard """
matrix: "--mm:refc; --mm:orc"
"""
import std/paths
import std/assertions
import pathnorm

View File

@@ -1,4 +1,5 @@
discard """
matrix: "--mm:refc; --mm:orc"
targets: "c cpp js"
output: '''
PEG AST traversal output

View File

@@ -1,5 +1,6 @@
discard """
outputsub: ""
matrix: "--mm:refc; --mm:orc"
disabled: windows
"""
# Test Posix interface

View File

@@ -1,6 +1,6 @@
discard """
joinable: false # to avoid messing with global rand state
matrix: "; --backend:js --jsbigint64:off; --backend:js --jsbigint64:on"
matrix: "--mm:refc; --mm:orc; --backend:js --jsbigint64:off; --backend:js --jsbigint64:on"
"""
import std/[assertions, formatfloat]
import std/[random, math, stats, sets, tables]

View File

@@ -1,3 +1,7 @@
discard """
matrix: "--mm:refc; --mm:orc"
"""
import std/[rationals, math]
import std/assertions

View File

@@ -1,3 +1,7 @@
discard """
matrix: "--mm:refc; --mm:orc"
"""
import std/re
import std/assertions

View File

@@ -1,5 +1,6 @@
discard """
output: "key: keyAYes!"
matrix: "--mm:refc; --mm:orc"
"""
# Test the new regular expression module
# which is based on the PCRE library

View File

@@ -1,6 +1,6 @@
discard """
disabled: "unix"
matrix: "--gc:refc; --gc:arc"
matrix: "--mm:refc; --mm:orc"
"""
when defined(windows):

View File

@@ -1,6 +1,6 @@
discard """
targets: "c cpp js"
matrix: ";--gc:arc"
matrix: "--mm:refc;--mm:arc"
"""
# if excessive, could remove 'cpp' from targets

View File

@@ -1,4 +1,5 @@
discard """
matrix: "--mm:refc; --mm:orc"
targets: "c js"
"""

View File

@@ -17,6 +17,7 @@ discard """
[Suite] RST inline markup
'''
matrix: "--mm:refc; --mm:orc"
"""
# tests for rst module

View File

@@ -1,4 +1,5 @@
discard """
matrix: "--mm:refc; --mm:orc"
outputsub: ""
"""

View File

@@ -1,4 +1,5 @@
discard """
matrix: "--mm:refc; --mm:orc"
targets: "c js"
"""

View File

@@ -1,4 +1,5 @@
discard """
matrix: "--mm:refc; --mm:orc"
targets: "c js"
"""

View File

@@ -1,3 +1,7 @@
discard """
matrix: "--mm:refc; --mm:orc"
"""
import std/sha1
import std/assertions

View File

@@ -1,5 +1,5 @@
discard """
matrix: "--threads:on"
matrix: "--mm:orc; --mm:refc"
"""
import std/sharedlist

View File

@@ -1,5 +1,5 @@
discard """
cmd: "nim $target --threads:on $options $file"
matrix: "--mm:refc; --mm:orc"
output: '''
'''
"""

View File

@@ -1,4 +1,5 @@
discard """
matrix: "--mm:refc; --mm:orc"
output: '''
OM
NIM

View File

@@ -1,5 +1,5 @@
discard """
outputsub: ""
matrix: "--mm:refc; --mm:orc"
"""
import algorithm

View File

@@ -1,4 +1,5 @@
discard """
matrix: "--mm:refc; --mm:orc"
output: '''true'''
"""

View File

@@ -1,4 +1,5 @@
discard """
matrix: "--mm:refc; --mm:orc"
joinable: false
disabled: "freebsd"
disabled: "openbsd"

Some files were not shown because too many files have changed in this diff Show More