Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
riscv-gcc-1
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
riscv-gcc-1
Commits
64f3ecb1
Commit
64f3ecb1
authored
Sep 03, 2002
by
Nicola Pero
Committed by
Nicola Pero
Sep 03, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
New testcase
From-SVN: r56752
parent
871b8583
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
65 additions
and
0 deletions
+65
-0
gcc/testsuite/ChangeLog
+4
-0
gcc/testsuite/objc/execute/nil_method-1.m
+61
-0
No files found.
gcc/testsuite/ChangeLog
View file @
64f3ecb1
Tue Sep 3 11:04:26 2002 Nicola Pero <n.pero@mi.flashnet.it>
* objc/execute/nil_method-1.m: New testcase.
Sun Sep 1 12:47:39 2002 Nicola Pero <n.pero@mi.flashnet.it>
* objc/execute/class-tests-1.h (test_class_with_superclass): Call
...
...
gcc/testsuite/objc/execute/nil_method-1.m
0 → 100644
View file @
64f3ecb1
/* Contributed by Nicola Pero - Fri Aug 30 12:55:37 2002 */
#include <objc/objc.h>
#include <objc/Object.h>
/* Test that calling a method of a nil object results in
nothing to happen (but not a crash), and nil to be
returned. */
@interface
TestClass
:
Object
-
(
void
)
testVoid
;
-
(
id
)
testId
;
-
(
void
)
testVoidWithA
:
(
int
)
a
;
-
(
id
)
testIdWithA
:
(
id
)
a
;
-
(
void
)
testVoidWithA
:
(
int
)
a
andB
:
(
int
)
b
;
-
(
id
)
testIdWithA
:
(
id
)
g
andB
:
(
id
)
b
;
-
(
void
)
voidSum
:
(
int
)
firstNumber
,
...;
-
(
id
)
sum
:
(
int
)
firstNumber
,
...;
@end
int
main
(
void
)
{
TestClass
*
t
=
nil
;
[
t
testVoid
];
if
([
t
testId
]
!=
nil
)
{
abort
();
}
[
t
testVoidWithA
:
234
];
if
([
t
testIdWithA
:
t
]
!=
nil
)
{
abort
();
}
[
t
testVoidWithA
:
12004
andB
:
-
123
];
if
([
t
testIdWithA
:
t
andB
:
nil
]
!=
nil
)
{
abort
();
}
[
t
voidSum
:
1
,
-
2
,
3
,
-
4
,
5
,
-
6
,
7
,
-
8
,
9
,
-
10
,
11
,
-
12
,
13
,
-
14
,
15
,
-
16
,
17
,
-
18
,
19
,
-
20
];
if
([
t
sum
:
1
,
2
,
3
,
4
,
5
,
6
,
7
,
8
,
9
,
10
,
11
,
12
,
13
,
14
,
15
,
16
,
17
,
18
,
19
,
20
]
!=
nil
)
{
abort
();
}
return
0
;
}
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