Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
gaoqiong
pybind11
Commits
676e2988
Commit
676e2988
authored
Jul 05, 2016
by
Ben North
Browse files
Test that check() catches wrong order of elements
Fails --- next commit will tighten test.
parent
c2f6841c
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
0 deletions
+3
-0
example/eigen.py
example/eigen.py
+2
-0
example/eigen.ref
example/eigen.ref
+1
-0
No files found.
example/eigen.py
View file @
676e2988
...
@@ -24,6 +24,8 @@ ref = np.array(
...
@@ -24,6 +24,8 @@ ref = np.array(
def
check
(
mat
):
def
check
(
mat
):
return
'OK'
if
np
.
sum
(
mat
-
ref
)
==
0
else
'NOT OK'
return
'OK'
if
np
.
sum
(
mat
-
ref
)
==
0
else
'NOT OK'
print
(
"should_give_NOT_OK = %s"
%
check
(
ref
[:,
::
-
1
]))
print
(
"fixed_r = %s"
%
check
(
fixed_r
()))
print
(
"fixed_r = %s"
%
check
(
fixed_r
()))
print
(
"fixed_c = %s"
%
check
(
fixed_c
()))
print
(
"fixed_c = %s"
%
check
(
fixed_c
()))
print
(
"pt_r(fixed_r) = %s"
%
check
(
fixed_passthrough_r
(
fixed_r
())))
print
(
"pt_r(fixed_r) = %s"
%
check
(
fixed_passthrough_r
(
fixed_r
())))
...
...
example/eigen.ref
View file @
676e2988
should_give_NOT_OK = NOT OK
fixed_r = OK
fixed_r = OK
fixed_c = OK
fixed_c = OK
pt_r(fixed_r) = OK
pt_r(fixed_r) = OK
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment