Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This test relates to a mailing list question from Gebrehiwet Biyane Welearegai: https://groups.google.com/forum/#!topic/wala-sourceforge-net/lS7lyCHfAaw
- Loading branch information
Showing
3 changed files
with
84 additions
and
0 deletions.
There are no files selected for viewing
37 changes: 37 additions & 0 deletions
37
com.ibm.wala.core.testdata/src/slice/TestPrimGetterSetter2.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2006 IBM Corporation. | ||
* All rights reserved. This program and the accompanying materials | ||
* are made available under the terms of the Eclipse Public License v1.0 | ||
* which accompanies this distribution, and is available at | ||
* http://www.eclipse.org/legal/epl-v10.html | ||
* | ||
* Contributors: | ||
* IBM Corporation - initial API and implementation | ||
*******************************************************************************/ | ||
package slice; | ||
|
||
public class TestPrimGetterSetter2 { | ||
|
||
static class IntWrapper { | ||
int i; | ||
|
||
int getI() { return i; } | ||
|
||
void setI(int i) { | ||
this.i = i; | ||
} | ||
} | ||
|
||
public static void doNothing(int i) {} | ||
/** | ||
* @param args | ||
*/ | ||
public static void main(String[] args) { | ||
IntWrapper w1 = new IntWrapper(); | ||
w1.setI(4); | ||
IntWrapper w2 = new IntWrapper(); | ||
w2.setI(5); | ||
w2.getI(); | ||
doNothing(w1.getI()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters