diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-11-10 11:34:32 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-11-10 11:34:32 -0800 |
commit | eed2f8149d04b0fc991d3893f59a00f7f30442f0 (patch) | |
tree | dd7faaa2d18b8a9aa2fe98a2b1c01a25219c7e32 | |
parent | 159315a0edf8770305a1f042c30285fcc06d8663 (diff) |
more precise float testing
-rw-r--r-- | tests/test_core.py | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/tests/test_core.py b/tests/test_core.py index 4b76a9db..8038ea83 100644 --- a/tests/test_core.py +++ b/tests/test_core.py @@ -8358,11 +8358,14 @@ extern "C" { if self.emcc_args is None: return self.skip('requires emcc') results = [ (1,'''GG*ctt**tgagc*'''), (20,'''GGCCGGGCGCGGTGGCTCACGCCTGTAATCCCAGCACTTT*cttBtatcatatgctaKggNcataaaSatgtaaaDcDRtBggDtctttataattcBgtcg**tacgtgtagcctagtgtttgtgttgcgttatagtctatttgtggacacagtatggtcaaa**tgacgtcttttgatctgacggcgttaacaaagatactctg*'''), (50,'''GGCCGGGCGCGGTGGCTCACGCCTGTAATCCCAGCACTTTGGGAGGCCGAGGCGGGCGGA*TCACCTGAGGTCAGGAGTTCGAGACCAGCCTGGCCAACAT*cttBtatcatatgctaKggNcataaaSatgtaaaDcDRtBggDtctttataattcBgtcg**tactDtDagcctatttSVHtHttKtgtHMaSattgWaHKHttttagacatWatgtRgaaa**NtactMcSMtYtcMgRtacttctWBacgaa**agatactctgggcaacacacatacttctctcatgttgtttcttcggacctttcataacct**ttcctggcacatggttagctgcacatcacaggattgtaagggtctagtggttcagtgagc**ggaatatcattcgtcggtggtgttaatctatctcggtgtagcttataaatgcatccgtaa**gaatattatgtttatttgtcggtacgttcatggtagtggtgtcgccgatttagacgtaaa**ggcatgtatg*''') ] - for t in ['float', 'double']: - print t - src = open(path_from_root('tests', 'fasta.cpp'), 'r').read().replace('double', t) - for i, j in results: - self.do_run(src, j, [str(i)], lambda x, err: x.replace('\n', '*'), no_build=i>1) + for precision in [0, 1, 2]: + Settings.PRECISE_F32 = precision + for t in ['float', 'double']: + print precision, t + src = open(path_from_root('tests', 'fasta.cpp'), 'r').read().replace('double', t) + for i, j in results: + self.do_run(src, j, [str(i)], lambda x, err: x.replace('\n', '*'), no_build=i>1) + shutil.copyfile('src.cpp.o.js', '%d_%s.js' % (precision, t)) def test_whets(self): if not Settings.ASM_JS: return self.skip('mainly a test for asm validation here') |