Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes to the graph package and added tests #108

Merged
merged 26 commits into from
Jul 23, 2022
Merged

Fixes to the graph package and added tests #108

merged 26 commits into from
Jul 23, 2022

Conversation

Wonseo-C
Copy link
Collaborator

@Wonseo-C Wonseo-C commented Jul 9, 2022

This is the branch where @lhstrh, @hokeun, @CloverCho, and I worked.
After the #107 PR, we tested the basic graph test (graph.test.ts) to find the error of graph.ts.

@Wonseo-C
Copy link
Collaborator Author

Wonseo-C commented Jul 9, 2022

@CloverCho and I finished implementing graph.test.ts except for detecting cycles and overlap in the toString()'s buildChain()

Log.global.debug("Cycle detected.");
Log.global.debug("Overlapping chain detected.");

@hokeun @lhstrh

@hokeun hokeun requested review from lhstrh and hokeun July 11, 2022 01:43
Copy link
Member

@hokeun hokeun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great to me!

__tests__/InvalidMutations.ts Outdated Show resolved Hide resolved
src/core/reactor.ts Outdated Show resolved Hide resolved
src/core/reactor.ts Outdated Show resolved Hide resolved
src/core/reactor.ts Outdated Show resolved Hide resolved
__tests__/graph.test.ts Outdated Show resolved Hide resolved
@Wonseo-C Wonseo-C requested a review from lhstrh July 14, 2022 22:47
src/core/reactor.ts Outdated Show resolved Hide resolved
src/core/reactor.ts Outdated Show resolved Hide resolved
src/core/reactor.ts Outdated Show resolved Hide resolved
__tests__/graph.test.ts Outdated Show resolved Hide resolved

expect(() => {
this.connect(__in1, __out2)
}).toThrowError("New connection introduces direct feed through.") // dist port already in use
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe that this test is wrong (even though it passes). Since there already is a mutation that establishes direct feed through, it doesn't seem like this connection should introduce it. I think the expected behavior here would be that the connection would be successful.

Copy link
Member

@lhstrh lhstrh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great! 🚀 🚀 🚀

Copy link
Member

@lhstrh lhstrh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I enabled running the tests, and it shows there still are some problems...

@lhstrh
Copy link
Member

lhstrh commented Jul 23, 2022

I'm going to go ahead and merge this since this is to be merged into the test-coverage branch, anyway. We can address test failures there.

@lhstrh lhstrh merged commit 51fe951 into lf-lang:test-coverage Jul 23, 2022
@lhstrh lhstrh changed the title Graph test Fixes to the graph package and added tests Jul 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants