Added test cases for LDC GitHub issue #340.