mirror of
https://github.com/nim-lang/Nim.git
synced 2026-09-04 04:40:27 +00:00
remove the whole IC category of tests
This commit is contained in:
@@ -1 +0,0 @@
|
||||
--mm:refc
|
||||
@@ -1,7 +0,0 @@
|
||||
|
||||
type
|
||||
Base* = ref object of RootObj
|
||||
s*: string
|
||||
|
||||
method m*(b: Base) {.base.} =
|
||||
echo "Base ", b.s
|
||||
@@ -1,15 +0,0 @@
|
||||
|
||||
import std/macros
|
||||
import std/macrocache
|
||||
|
||||
const myCounter = CacheCounter"myCounter"
|
||||
|
||||
proc getUniqueId*(): int {.compileTime.} =
|
||||
inc myCounter
|
||||
result = myCounter.value
|
||||
|
||||
static:
|
||||
myCounter.inc(3)
|
||||
assert myCounter.value == 3
|
||||
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
|
||||
converter toBool*(x: int): bool = x != 0
|
||||
@@ -1,9 +0,0 @@
|
||||
from mimportsb {.all.} import fnb1, hfnb3
|
||||
|
||||
proc fn1*(): int = 1
|
||||
proc fn2*(): int = 2
|
||||
proc hfn3(): int = 3
|
||||
proc hfn4(): int = 4
|
||||
proc hfn5(): int = 5
|
||||
|
||||
export mimportsb.fnb2, hfnb3
|
||||
@@ -1,4 +0,0 @@
|
||||
proc fnb1*(): int = 1
|
||||
proc fnb2*(): int = 2
|
||||
proc hfnb3(): int = 3
|
||||
proc hfnb4(): int = 4
|
||||
@@ -1,24 +0,0 @@
|
||||
discard """
|
||||
output: '''id 4'''
|
||||
"""
|
||||
|
||||
import mcompiletime_counter
|
||||
|
||||
const intId = getUniqueId()
|
||||
|
||||
echo "id ", intId
|
||||
|
||||
#!EDIT!#
|
||||
|
||||
discard """
|
||||
output: '''id 4 5'''
|
||||
"""
|
||||
|
||||
import mcompiletime_counter
|
||||
|
||||
const
|
||||
intId = getUniqueId()
|
||||
floatId = getUniqueId()
|
||||
|
||||
echo "id ", intId, " ", floatId
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
discard """
|
||||
output: "yes"
|
||||
"""
|
||||
|
||||
import mdefconverter
|
||||
|
||||
echo "yes"
|
||||
|
||||
#!EDIT!#
|
||||
|
||||
discard """
|
||||
output: "converted int to bool"
|
||||
"""
|
||||
|
||||
import mdefconverter
|
||||
|
||||
if 4:
|
||||
echo "converted int to bool"
|
||||
@@ -1,11 +0,0 @@
|
||||
discard """
|
||||
cmd: "nim cpp --incremental:on $file"
|
||||
"""
|
||||
|
||||
{.emit:"""/*TYPESECTION*/
|
||||
#include <iostream>
|
||||
struct Foo { };
|
||||
""".}
|
||||
|
||||
type Foo {.importcpp.} = object
|
||||
echo $Foo() #Notice the generic is instantiate in the this module if not, it wouldnt find Foo
|
||||
@@ -1,38 +0,0 @@
|
||||
discard """
|
||||
output: "bar"
|
||||
"""
|
||||
|
||||
import tables
|
||||
|
||||
var tab: Table[string, string]
|
||||
|
||||
tab["foo"] = "bar"
|
||||
echo tab["foo"]
|
||||
|
||||
#!EDIT!#
|
||||
|
||||
discard """
|
||||
output: "bar 3"
|
||||
"""
|
||||
|
||||
import tables
|
||||
|
||||
var tab: Table[string, string]
|
||||
var tab2: Table[string, int]
|
||||
|
||||
tab["foo"] = "bar"
|
||||
tab2["meh"] = 3
|
||||
echo tab["foo"], " ", tab2["meh"]
|
||||
|
||||
#!EDIT!#
|
||||
|
||||
discard """
|
||||
output: "3"
|
||||
"""
|
||||
|
||||
import tables
|
||||
|
||||
var tab2: Table[string, int]
|
||||
|
||||
tab2["meh"] = 3
|
||||
echo tab2["meh"]
|
||||
@@ -1,28 +0,0 @@
|
||||
discard """
|
||||
output: "Hello World"
|
||||
"""
|
||||
|
||||
const str = "Hello World"
|
||||
echo str
|
||||
|
||||
# Splitters are done with this special comment:
|
||||
|
||||
#!EDIT!#
|
||||
|
||||
discard """
|
||||
output: "Hello World B"
|
||||
"""
|
||||
|
||||
const str = "Hello World"
|
||||
echo str, " B"
|
||||
|
||||
#!EDIT!#
|
||||
|
||||
discard """
|
||||
output: "Hello World C"
|
||||
"""
|
||||
|
||||
const str = "Hello World"
|
||||
var x = 7
|
||||
if 3+4 == x:
|
||||
echo str, " C"
|
||||
@@ -1,7 +0,0 @@
|
||||
import ../ccgbugs/mseq_importc_alias
|
||||
|
||||
type CIntAlias = cint
|
||||
|
||||
var values: seq[CIntAlias]
|
||||
resizeCints(values, 2)
|
||||
doAssert cintLen(values) == 2
|
||||
@@ -1,29 +0,0 @@
|
||||
import mimports
|
||||
doAssert fn1() == 1
|
||||
doAssert not declared(hfn3)
|
||||
|
||||
#!EDIT!#
|
||||
|
||||
import mimports {.all.}
|
||||
doAssert fn1() == 1
|
||||
doAssert declared(hfn3)
|
||||
doAssert hfn3() == 3
|
||||
doAssert mimports.hfn4() == 4
|
||||
|
||||
# reexports
|
||||
doAssert not declared(fnb1)
|
||||
doAssert not declared(hfnb4)
|
||||
doAssert fnb2() == 2
|
||||
doAssert hfnb3() == 3
|
||||
|
||||
#!EDIT!#
|
||||
|
||||
from mimports {.all.} import hfn3
|
||||
doAssert not declared(fn1)
|
||||
from mimports {.all.} as bar import fn1
|
||||
doAssert fn1() == 1
|
||||
doAssert hfn3() == 3
|
||||
doAssert not declared(hfn4)
|
||||
doAssert declared(mimports.hfn4)
|
||||
doAssert mimports.hfn4() == 4
|
||||
doAssert bar.hfn4() == 4
|
||||
@@ -1,28 +0,0 @@
|
||||
discard """
|
||||
output: '''Base abc'''
|
||||
"""
|
||||
|
||||
import mbaseobj
|
||||
|
||||
var c = Base(s: "abc")
|
||||
m c
|
||||
|
||||
#!EDIT!#
|
||||
|
||||
discard """
|
||||
output: '''Base abc
|
||||
Inherited abc'''
|
||||
"""
|
||||
|
||||
import mbaseobj
|
||||
|
||||
type
|
||||
Inherited = ref object of Base
|
||||
|
||||
method m(i: Inherited) =
|
||||
procCall m(Base i)
|
||||
echo "Inherited ", i.s
|
||||
|
||||
var c = Inherited(s: "abc")
|
||||
m c
|
||||
|
||||
Reference in New Issue
Block a user