Skip to content

Commit

Permalink
remove redundant runnableExample
Browse files Browse the repository at this point in the history
  • Loading branch information
Clonkk committed Sep 16, 2024
1 parent 268dff3 commit d0fe81c
Showing 1 changed file with 6 additions and 15 deletions.
21 changes: 6 additions & 15 deletions cppstl.nim
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ export std_complex
import cppstl/std_pair
export std_pair

when not defined(cpp):
{.error: "C++ backend required to use STL wrapper".}
# std=c++11 at least needed
# {.passC: "-std=c++11".}

## Nim wrapper for C++ STL :
## * ``std::vector`` mapped to ``CppVector``
## * ``std::basic_string`` mapped to ``CppBasicString``
Expand All @@ -32,17 +37,6 @@ runnableExamples:
stdstr.replace(startportion, endportion, "QW")
assert stdstr == "QWERTYUIOP"

runnableExamples:
import cppstl
import math
var vec = initCppVector[float64]()
for i in 0..<5:
vec.push_back(sqrt(i.float64))
assert vec[0] == sqrt 0.0
assert vec[1] == sqrt 1.0
assert vec[2] == sqrt 2.0
assert vec[3] == sqrt 3.0

runnableExamples:
import cppstl
import complex
Expand All @@ -51,7 +45,4 @@ runnableExamples:
assert conj_z.real == z.real
assert conj_z.imag == -z.imag

when not defined(cpp):
{.error: "C++ backend required to use STL wrapper".}
# std=c++11 at least needed
# {.passC: "-std=c++11".}

0 comments on commit d0fe81c

Please sign in to comment.