summary refs log tree commit diff stats
path: root/tests/pragmas
diff options
context:
space:
mode:
authormetagn <metagngn@gmail.com>2023-06-06 07:54:07 +0300
committerGitHub <noreply@github.com>2023-06-06 06:54:07 +0200
commitb97d603cd00a210547bda1a2a1c3e09f97fcc49e (patch)
tree080b4ad7b5826b88a9483c6a0e4d697096f12cc1 /tests/pragmas
parent2ab948ce53e3d9b80bf9b02644c8ec8991f34d0a (diff)
downloadNim-b97d603cd00a210547bda1a2a1c3e09f97fcc49e.tar.gz
some test cleanups & category reorganization (#22010)
* clean up some test categories

* mention exact slice issue

* magics into system

* move trangechecks into overflow

* move tmemory to system

* try fix CI

* try fix CI

* final CI fix
Diffstat (limited to 'tests/pragmas')
-rw-r--r--tests/pragmas/mused2a.nim23
-rw-r--r--tests/pragmas/mused2b.nim3
-rw-r--r--tests/pragmas/mused2c.nim1
-rw-r--r--tests/pragmas/mused3.nim76
-rw-r--r--tests/pragmas/mused3a.nim41
-rw-r--r--tests/pragmas/mused3b.nim12
-rw-r--r--tests/pragmas/tused2.nim46
7 files changed, 0 insertions, 202 deletions
diff --git a/tests/pragmas/mused2a.nim b/tests/pragmas/mused2a.nim
deleted file mode 100644
index d9b2bb9bf..000000000
--- a/tests/pragmas/mused2a.nim
+++ /dev/null
@@ -1,23 +0,0 @@
-import std/strutils
-
-from std/os import fileExists
-
-import std/typetraits as typetraits2
-from std/setutils import complement
-
-
-
-
-
-proc fn1() = discard
-proc fn2*() = discard
-
-
-let fn4 = 0
-let fn5* = 0
-
-
-const fn7 = 0
-const fn8* = 0
-
-type T1 = object
diff --git a/tests/pragmas/mused2b.nim b/tests/pragmas/mused2b.nim
deleted file mode 100644
index 39c92b964..000000000
--- a/tests/pragmas/mused2b.nim
+++ /dev/null
@@ -1,3 +0,0 @@
-import mused2c
-export mused2c
-
diff --git a/tests/pragmas/mused2c.nim b/tests/pragmas/mused2c.nim
deleted file mode 100644
index a374e634e..000000000
--- a/tests/pragmas/mused2c.nim
+++ /dev/null
@@ -1 +0,0 @@
-proc baz*() = discard
\ No newline at end of file
diff --git a/tests/pragmas/mused3.nim b/tests/pragmas/mused3.nim
deleted file mode 100644
index 0beec1d44..000000000
--- a/tests/pragmas/mused3.nim
+++ /dev/null
@@ -1,76 +0,0 @@
-#[
-ran from trunner
-]#
-
-
-
-
-
-
-# line 10
-when defined case1:
-  from mused3a import nil
-  from mused3b import nil
-  mused3a.fn1()
-
-when defined case2:
-  from mused3a as m1 import nil
-  m1.fn1()
-
-when defined case3:
-  from mused3a import fn1
-  fn1()
-
-when defined case4:
-  from mused3a as m1 import fn1
-  m1.fn1()
-
-when defined case5:
-  import mused3a as m1
-  fn1()
-
-when defined case6:
-  import mused3a except nonexistent
-  fn1()
-
-when defined case7:
-  import mused3a
-  mused3a.fn1()
-
-when defined case8:
-  # re-export test
-  import mused3a except nonexistent
-  gn1()
-
-when defined case9:
-  # re-export test
-  import mused3a
-  gn1()
-
-when defined case10:
-  #[
-  edge case which happens a lot in compiler code:
-  don't report UnusedImport for mused3b here even though it works without `import mused3b`,
-  because `a.b0.f0` is accessible from both mused3a and mused3b (fields are given implicit access)
-  ]#
-  import mused3a
-  import mused3b
-  var a: Bar
-  discard a.b0.f0
-
-when false:
-  when defined case11:
-    #[
-    xxx minor bug: this should give:
-    Warning: imported and not used: 'm2' [UnusedImport]
-    but doesn't, because currently implementation in `markOwnerModuleAsUsed`
-    only looks at `fn1`, not fully qualified call `m1.fn1()
-    ]#
-    from mused3a as m1 import nil
-    from mused3a as m2 import nil
-    m1.fn1()
-
-when defined case12:
-  import mused3a
-  import mused3a
-  fn1()
diff --git a/tests/pragmas/mused3a.nim b/tests/pragmas/mused3a.nim
deleted file mode 100644
index c33d1ecb3..000000000
--- a/tests/pragmas/mused3a.nim
+++ /dev/null
@@ -1,41 +0,0 @@
-when defined case1:
-  proc fn1*() = discard
-
-when defined case2:
-  proc fn1*() = discard
-
-when defined case3:
-  proc fn1*() = discard
-  proc fn2*() = discard
-
-when defined case4:
-  proc fn1*() = discard
-  proc fn2*() = discard
-
-when defined case5:
-  proc fn1*() = discard
-
-when defined case6:
-  proc fn1*() = discard
-
-when defined case7:
-  proc fn1*() = discard
-
-when defined case8:
-  import mused3b
-  export mused3b
-
-when defined case9:
-  import mused3b
-  export mused3b
-
-when defined case10:
-  import mused3b
-  type Bar* = object
-    b0*: Foo
-
-when defined case11:
-  proc fn1*() = discard
-
-when defined case12:
-  proc fn1*() = discard
diff --git a/tests/pragmas/mused3b.nim b/tests/pragmas/mused3b.nim
deleted file mode 100644
index de288bb08..000000000
--- a/tests/pragmas/mused3b.nim
+++ /dev/null
@@ -1,12 +0,0 @@
-when defined case1:
-  proc gn1*()=discard
-
-when defined case8:
-  proc gn1*()=discard
-
-when defined case9:
-  proc gn1*()=discard
-
-when defined case10:
-  type Foo* = object
-    f0*: int
diff --git a/tests/pragmas/tused2.nim b/tests/pragmas/tused2.nim
deleted file mode 100644
index f80c198d8..000000000
--- a/tests/pragmas/tused2.nim
+++ /dev/null
@@ -1,46 +0,0 @@
-discard """
-  matrix: "--hint:all:off --hint:XDeclaredButNotUsed --path:."
-  joinable: false
-  nimoutFull: true
-  nimout: '''
-mused2a.nim(12, 6) Hint: 'fn1' is declared but not used [XDeclaredButNotUsed]
-mused2a.nim(16, 5) Hint: 'fn4' is declared but not used [XDeclaredButNotUsed]
-mused2a.nim(20, 7) Hint: 'fn7' is declared but not used [XDeclaredButNotUsed]
-mused2a.nim(23, 6) Hint: 'T1' is declared but not used [XDeclaredButNotUsed]
-mused2a.nim(1, 11) Warning: imported and not used: 'strutils' [UnusedImport]
-mused2a.nim(3, 9) Warning: imported and not used: 'os' [UnusedImport]
-mused2a.nim(5, 23) Warning: imported and not used: 'typetraits2' [UnusedImport]
-mused2a.nim(6, 9) Warning: imported and not used: 'setutils' [UnusedImport]
-tused2.nim(42, 8) Warning: imported and not used: 'mused2a' [UnusedImport]
-tused2.nim(45, 11) Warning: imported and not used: 'strutils' [UnusedImport]
-'''
-"""
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-# line 40
-
-import mused2a
-import mused2b
-
-import std/strutils
-baz()