summary refs log tree commit diff stats
path: root/tests
diff options
context:
space:
mode:
authorringabout <43030857+ringabout@users.noreply.github.com>2023-01-28 04:41:59 +0800
committerGitHub <noreply@github.com>2023-01-27 21:41:59 +0100
commit1431f90d8c3d3ed0afcaee62073d5808cea227ff (patch)
tree0980a960ae6058507a8706d81b8f1e98c8d6e5fb /tests
parenta7bae919adb952362cb53206140872d2b7424b47 (diff)
downloadNim-1431f90d8c3d3ed0afcaee62073d5808cea227ff.tar.gz
Revert "Fix #13093 C++ Atomics: operator= is implicitly deleted because the default definition would be ill-formed " (#21307)
Revert "Fix #13093 C++ Atomics: operator= is implicitly deleted because the default definition would be ill-formed  (#21169)"

This reverts commit a7bae919adb952362cb53206140872d2b7424b47.
Diffstat (limited to 'tests')
-rw-r--r--tests/cpp/t13093.nim24
-rw-r--r--tests/cpp/t17982.nim20
2 files changed, 0 insertions, 44 deletions
diff --git a/tests/cpp/t13093.nim b/tests/cpp/t13093.nim
deleted file mode 100644
index 17c730d16..000000000
--- a/tests/cpp/t13093.nim
+++ /dev/null
@@ -1,24 +0,0 @@
-discard """
-  targets: "cpp"
-  action: reject
-  errormsg: "The PledgeObj type requires the following fields to be initialized: refCount"
-"""
-
-import atomics
-
-type
-  Pledge* = object
-    p: PledgePtr
-
-  PledgePtr = ptr PledgeObj
-  PledgeObj = object
-    refCount: Atomic[int32]
-
-proc main() =
-  var pledge: Pledge
-  pledge.p = createShared(PledgeObj)
-  let tmp = PledgeObj() # <---- not allowed: atomics are not copyable
-
-  pledge.p[] = tmp
-
-main()
diff --git a/tests/cpp/t17982.nim b/tests/cpp/t17982.nim
deleted file mode 100644
index 5413f06ff..000000000
--- a/tests/cpp/t17982.nim
+++ /dev/null
@@ -1,20 +0,0 @@
-discard """
-  targets: "cpp"
-  action: "compile"
-"""
-
-type
-  String* {.importcpp: "std::string", header: "string".} = object
-
-proc initString*(): String
-    {.importcpp: "std::string()", header: "string".}
-
-proc append*(this: var String, str: String): String
-    # bug seems to trigger when `#`, `@`, or `$1` is used inside `importcpp`
-    {.importcpp: "#.append(@)", header: "string", discardable.} # <- changed from `importcpp: "append"`
-
-var
-  s1 = initString()
-  s2 = initString()
-
-s1.append s2