| Line | Branch | Exec | Source |
|---|---|---|---|
| 1 | #include "functions.h" | ||
| 2 | #include <cstdlib> | ||
| 3 | #include <iostream> | ||
| 4 | #include <string> | ||
| 5 | #include <text_conversion_constexpr.h> | ||
| 6 | |||
| 7 | 3 | PyObject* py_convert(PyObject*, PyObject* args) | |
| 8 | { | ||
| 9 | const char* input_string; | ||
| 10 | |||
| 11 |
3/4✓ Branch 1 taken 3 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 2 times.
✓ Branch 4 taken 1 times.
|
3 | if (!PyArg_ParseTuple(args, "s", &input_string)) |
| 12 | { | ||
| 13 | 2 | return NULL; | |
| 14 | } | ||
| 15 | |||
| 16 |
1/2✓ Branch 2 taken 1 times.
✗ Branch 3 not taken.
|
1 | std::string data{input_string}; |
| 17 | |||
| 18 |
1/2✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
|
1 | text_conversion_constexpr::convert_to_title_case(data); |
| 19 | |||
| 20 |
1/2✓ Branch 2 taken 1 times.
✗ Branch 3 not taken.
|
1 | return PyUnicode_FromString(data.c_str()); |
| 21 | 1 | } | |
| 22 | |||
| 23 | 1 | PyObject* py_date(PyObject*, PyObject*) | |
| 24 | { | ||
| 25 | 1 | return PyUnicode_FromString(__DATE__); | |
| 26 | } | ||
| 27 |