Source.java

1
// Copyright © 2004-2006 University of Helsinki, Department of Computer Science
2
// Copyright © 2012 various contributors
3
// This software is released under GNU Lesser General Public License 2.1.
4
// The license text is at http://www.gnu.org/licenses/lgpl-2.1.html
5
6
package fi.helsinki.cs.titokone;
7
8
import fi.helsinki.cs.ttk91.TTK91CompileSource;
9
10
/**
11
 * This class represents source code. It contains the source as a delimited
12
 * string.
13
 */
14
public class Source implements TTK91CompileSource {
15
    /**
16
     * The source code as one long String, lines delimited with \n, \r\n or
17
     * \r.
18
     */
19
    private String sourceString;
20
21
    /**
22
     * This constructor initializes sourceString with its given string.
23
     *
24
     * @param source String containing source delimited with \n, \r\n or \r.
25
     */
26
    public Source(String source) {
27 1
        this.sourceString = source;
28
    }
29
30
    /**
31
     * @return The source code in one long String, lines delimited with
32
     *         \n, \r\n or \r.
33
     */
34
    public String getSource() {
35 1
        return sourceString;
36
    }
37
}

Mutations

27

Removed assignment to member variable sourceString : KILLED -> fi.helsinki.cs.titokone.ControlTest.testGetApplicationDefinitions(fi.helsinki.cs.titokone.ControlTest)

35

mutated return of Object value for fi/helsinki/cs/titokone/Source::getSource to ( if (x != null) null else throw new RuntimeException ) : KILLED -> fi.helsinki.cs.titokone.ControlTest.testGetApplicationDefinitions(fi.helsinki.cs.titokone.ControlTest)

Active mutators

Tests examined


Report generated by PIT 0.27