Skip to content
This repository has been archived by the owner on Jun 3, 2024. It is now read-only.

Commit

Permalink
move test_data to tests
Browse files Browse the repository at this point in the history
  • Loading branch information
sophiajt committed Dec 17, 2023
1 parent c6e306e commit 26d2657
Show file tree
Hide file tree
Showing 7 changed files with 6 additions and 9 deletions.
2 changes: 1 addition & 1 deletion docs/philosophy.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ June is also geared towards application programming. Its direct OO approach coup

## Non-goal: Fine-grained memory reclamation

One characterist of June that you'll notice is that it prefers holding on to memory longer than other languages. You can think of this as a kind of memory "bloat" compared to more fine-grained allocation system. In one sense, the style is something more akin to garbage collection, though June does not use a garbage collector.
One characteristic of June that you'll notice is that it prefers holding on to memory longer than other languages. You can think of this as a kind of memory "bloat" compared to more fine-grained allocation system. In one sense, the style is something more akin to garbage collection, though June does not use a garbage collector.

As it turns out, using intentional memory bloat is common. Rust and C++ developers, for example, use bloat to their advantage regularly. Take for example this Rust code:

Expand Down
5 changes: 1 addition & 4 deletions src/typechecker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2155,10 +2155,7 @@ impl Typechecker {
}
}

self.error(
format!("could not find enum case when created enum value"),
item,
);
self.error("could not find enum case when created enum value", item);
}
AstNode::Name => {
let case_name = self.compiler.get_source(item);
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/extern_c/file_io_abstraction.june
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class File {
}

fun main() {
mut file = File::open(c"test_data/alphabet.txt");
mut file = File::open(c"tests/test_data/alphabet.txt");
while true {
let x = file.get_char();

Expand Down
2 changes: 1 addition & 1 deletion tests/integration/extern_c/file_ptr.june
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ extern "C" fun fclose(file: FILE?) -> c_int;
extern "C" fun fgetc(file: FILE?) -> c_int;

fun main() {
let file = fopen(c"test_data/alphabet.txt", c"rb");
let file = fopen(c"tests/test_data/alphabet.txt", c"rb");
if file != none {
let x = fgetc(file)
println(x as c_char)
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/extern_c/file_ptr_all.june
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ extern "C" fun fclose(file: FILE?) -> c_int;
extern "C" fun fgetc(file: FILE?) -> c_int;

fun main() {
let file = fopen(c"test_data/alphabet.txt", c"rb");
let file = fopen(c"tests/test_data/alphabet.txt", c"rb");
if file != none {
mut c = fgetc(file)
while c != -1 && c != 10 && c != 13 {
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/extern_c/file_ptr_defer.june
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ fun cleanup(f: FILE?) {
}

fun main() {
let file = fopen(c"test_data/alphabet.txt", c"rb");
let file = fopen(c"tests/test_data/alphabet.txt", c"rb");
defer file cleanup
if file != none {
let x = fgetc(file)
Expand Down
File renamed without changes.

0 comments on commit 26d2657

Please sign in to comment.