Git Komut Rehberi & Terminal Asistanı
Sıfırdan Yeni Bir Depo Başlatın:
Mevcut Bir Git Deposu veya Klasörü Gönderin:
Hataları Geri Alma, İptal & Temizlik:
Son commit'i geri al (yapılan değişiklikleri korur):
git reset --soft HEAD~1
Yapılan yerel değişiklikleri iptal et (çalışma ağacını temizler):
git restore .
Takip edilmeyen gereksiz dosyaları sil:
git clean -fd
Değişiklikleri geçici sakla ve geri getir (stash):
git stash git stash pop
Dal (Branch) ve Sürüm Etiketleri:
Yeni dal aç ve geçiş yap:
git checkout -b yeni-ozellik git push -u origin yeni-ozellik
Sürüm etiketi (tag) oluştur ve gönder:
git tag -a v1.0.0 -m "Sürüm 1.0.0" git push origin --tags
- SnapVoice Turkce sesli CAD ve komut konsolu (/denetle, /ram, /eko, /otomatik, /sessiz) - 3B uzamsal sesli radar ve gorme engelli gelistirici geometri denetim motoru - LibreDWG/DXF ikili sikistirma, font tembel yukleme ve RAM optimizasyonu - Monitor cozunurlugune gore otomatik uyarlamali dinamik grafik modu
70 lines
2.1 KiB
TypeScript
70 lines
2.1 KiB
TypeScript
import { describe, it, expect } from "vitest";
|
||
import {
|
||
calculateSpatialSonarParameters,
|
||
formatShapeAccessibleDescription,
|
||
} from "../../apps/web/src/lib/spatialAudioSonar";
|
||
|
||
describe("Spatial Audio Sonar & Acoustic Radar", () => {
|
||
it("calculates stereo panning correctly based on X coordinate", () => {
|
||
const left = calculateSpatialSonarParameters(-150, 0, 0);
|
||
expect(left.pan).toBe(-1);
|
||
|
||
const right = calculateSpatialSonarParameters(150, 0, 0);
|
||
expect(right.pan).toBe(1);
|
||
|
||
const center = calculateSpatialSonarParameters(0, 0, 0);
|
||
expect(center.pan).toBe(0);
|
||
});
|
||
|
||
it("maps elevation/height to audio frequency (pitch)", () => {
|
||
const low = calculateSpatialSonarParameters(0, 0, 0);
|
||
const mid = calculateSpatialSonarParameters(0, 50, 0);
|
||
const high = calculateSpatialSonarParameters(0, 100, 0);
|
||
|
||
expect(low.frequency).toBe(220);
|
||
expect(mid.frequency).toBeGreaterThan(low.frequency);
|
||
expect(high.frequency).toBe(880);
|
||
});
|
||
|
||
it("shifts hole/cavity frequency to darker tone", () => {
|
||
const solid = calculateSpatialSonarParameters(0, 50, 0, false);
|
||
const hole = calculateSpatialSonarParameters(0, 50, 0, true);
|
||
|
||
expect(hole.isHole).toBe(true);
|
||
expect(hole.frequency).toBeLessThan(solid.frequency);
|
||
});
|
||
|
||
it("formats rich Turkish description for screen readers", () => {
|
||
const boxDesc = formatShapeAccessibleDescription({
|
||
name: "Ana Kutu",
|
||
hole: false,
|
||
width: 50,
|
||
depth: 30,
|
||
height: 20,
|
||
x: 10,
|
||
y: 0,
|
||
z: -15,
|
||
});
|
||
|
||
expect(boxDesc).toContain("Ana Kutu seçildi");
|
||
expect(boxDesc).toContain("Katı gövde");
|
||
expect(boxDesc).toContain("50'e 30");
|
||
expect(boxDesc).toContain("yükseklik 20 milimetre");
|
||
expect(boxDesc).toContain("Konum: X 10, Z -15");
|
||
|
||
const holeCylDesc = formatShapeAccessibleDescription({
|
||
name: "M6 Civata Deliği",
|
||
hole: true,
|
||
radius: 3,
|
||
height: 25,
|
||
x: 0,
|
||
y: 5,
|
||
z: 0,
|
||
});
|
||
|
||
expect(holeCylDesc).toContain("M6 Civata Deliği");
|
||
expect(holeCylDesc).toContain("Delik ve boşaltma gövdesi");
|
||
expect(holeCylDesc).toContain("Yarıçap 3");
|
||
});
|
||
});
|